code: def test_class_enumerator():
      class SomeModule:
          class SomeClass(cuml.Base):
              pass
  
          class ExcludedClass(cuml.Base):
              pass
  
          class CustomConstructorClass(cuml.Base):
              def __init__(self, *, some_parameter):
                  self.some_parameter = some_parameter
  
              def __eq__(self, other):
                  return self.some_parameter == other.some_parameter
  
      module = ClassEnumerator(
          module=SomeModule,
          exclude_classes=[SomeModule.ExcludedClass],
          custom_constructors={
              "CustomConstructorClass": lambda: SomeModule.CustomConstructorClass(
                  some_parameter=1
              )
          },
      )
  
      models = module.get_models()
      ref = {
          "SomeClass": SomeModule.SomeClass,
          "CustomConstructorClass": lambda: SomeModule.CustomConstructorClass(
              some_parameter=1
          ),
      }
  
      # Here we don't do `assert models == ref` because CustomConstructorClass is
      # a lambda.
      assert len(models) == len(ref) == 2
      assert models["SomeClass"] == ref["SomeClass"]
      assert (
          models["CustomConstructorClass"]()
          == ref["CustomConstructorClass"]()
      )
  
imports: import cuml
  from cuml.testing.utils import ClassEnumerator
label_desc: Use image node_id 1 for calling a global function with example usage: test_class_enumerator() and returns: unknown