code: def find_components(package, directory, base_class):
      components = OrderedDict()
  
      for module_loader, module_name, ispkg in pkgutil.iter_modules(
          [directory]
      ):
          full_module_name = "%s.%s" % (package, module_name)
          if full_module_name not in sys.modules and not ispkg:
              module = importlib.import_module(full_module_name)
  
              for member_name, obj in inspect.getmembers(module):
                  if (
                      inspect.isclass(obj)
                      and issubclass(obj, base_class)
                      and obj != base_class
                  ):
                      # TODO test if the obj implements the interface
                      # Keep in mind that this only instantiates the ensemble_wrapper,
                      # but not the real target classifier
                      classifier = obj
                      components[module_name] = classifier
  
      return components
  
imports: from typing import Dict, Optional
  import importlib
  import inspect
  import pkgutil
  import sys
  from collections import OrderedDict
  from sklearn.base import BaseEstimator, TransformerMixin
  from autosklearn.askl_typing import FEAT_TYPE_TYPE
  from autosklearn.pipeline.constants import SPARSE
label_desc: Use image node_id 1 for calling a global function with example usage: find_components(package, directory, base_class) and returns: components