code: def get_classes_from_package(package, import_sub_packages=False):
      """
      Gets all modules imported in the specified package and returns a dictionary
      of any classes that derive from `cuml.Base`
  
      Parameters
      ----------
      package : python module The python module to search import_sub_packages :
          bool, default=False When set to True, will try to import sub packages
          by searching the directory tree for __init__.py files and importing
          them accordingly. By default this is set to False
  
      Returns
      -------
      ClassEnumerator Class enumerator for the specified package
      """
  
      if import_sub_packages:
          import os
          import importlib
  
          # First, find all __init__.py files in subdirectories of this package
          root_dir = os.path.dirname(package.__file__)
  
          root_relative = os.path.dirname(root_dir)
  
          # Now loop
          for root, _, files in os.walk(root_dir):
              if "__init__.py" in files:
                  module_name = os.path.relpath(
                      root, root_relative
                  ).replace(os.sep, ".")
  
                  importlib.import_module(module_name)
  
      return ClassEnumerator(
          module=package, recursive=True
      ).get_models()
  
imports: import pytest
  from cuml.internals.mem_type import MemoryType
  from cuml.internals.input_utils import input_to_cuml_array, is_array_like
  from cuml.internals.base import Base
  import cuml
  from sklearn.model_selection import train_test_split
  from sklearn.metrics import mean_squared_error, brier_score_loss
  from sklearn.datasets import make_classification, make_regression
  from sklearn import datasets
  from pylibraft.common.cuda import Stream
  from sklearn.datasets import make_regression
  from numba.cuda.cudadrv.devicearray import DeviceNDArray
  from numbers import Number
  from cuml.internals.safe_imports import gpu_only_import_from
  from itertools import dropwhile
  from copy import deepcopy
  from cuml.internals.safe_imports import cpu_only_import
  import inspect
  from textwrap import dedent, indent
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 15 for calling a global function with example usage: get_classes_from_package(package, import_sub_packages) and returns: ClassEnumerator