code: def find_sklearn_classes(class_):
      classifiers = set()
      all_subdirectories = []
      sklearn_path = sklearn.__path__[0]
      for root, dirs, files in os.walk(sklearn_path):
          all_subdirectories.append(root)
  
      for module_loader, module_name, ispkg in pkgutil.iter_modules(
          all_subdirectories
      ):
          # Work around some issues...
          if module_name in ["hmm", "mixture"]:
              print("Skipping %s" % module_name)
              continue
  
          module_file = module_loader.__dict__["path"]
          sklearn_module = module_file.replace(
              sklearn_path, ""
          ).replace("/", ".")
          full_module_name = (
              "sklearn" + sklearn_module + "." + module_name
          )
  
          pkg = importlib.import_module(full_module_name)
  
          for member_name, obj in inspect.getmembers(pkg):
              if inspect.isclass(obj) and issubclass(obj, class_):
                  classifier = obj
                  # print member_name, obj
                  classifiers.add(classifier)
  
      print()
      for classifier in sorted([str(cls) for cls in classifiers]):
          print(classifier)
  
imports: import importlib
  import inspect
  import os
  import pkgutil
  import numpy
  import scipy.sparse
  import sklearn
  import sklearn.base
  import sklearn.datasets
  import unittest
label_desc: Use image node_id 1 for calling a global function with example usage: find_sklearn_classes(class_) without return types