import sklearn
import importlib

def loader(m):
    for a in getattr(m, '__all__', []):
        try:
            importlib.import_module(m.__name__ + '.' + a)
            loader(getattr(m, a, None))
        except ModuleNotFoundError:
            pass

print("sklearn.__version__: %s" % sklearn.__version__)

# load all of scikit-learn and its submodules
loader(sklearn)
