code: def __new__(mcls, name, bases, namespace, **kwargs):
      model = namespace.get("__model__")
      mapped_properties = namespace.get("__mapped_properties__")
      if not model:
          raise TypeError(
              f"Model-mapped class '{name}' attribute '__model__' must be set to mapped model."
          )
  
      if mcls.__mapping__.get(model):
          return mcls.__mapping__.get(model)
  
      schema = []
      for attribute in mapped_properties:
          if not isinstance(attribute, ModelMappedProperty):
              raise TypeError(
                  f"Mapped property '{attribute.name}' should be of type 'MappedProperty'."
              )
          schema.append(attribute.name)
          if attribute.autogenerate:
              namespace[attribute.name] = attribute.generate_property()
      namespace["__schema__"] = tuple(schema)
  
      def fields(cls):
          return cls.__schema__
  
      namespace["fields"] = classmethod(fields)
      type_ = ABCMeta.__new__(mcls, name, bases, namespace, **kwargs)
      mcls.__mapping__[model] = type_
      return type_
  
file_path: aim/aim/storage/structured/sql_engine/utils.py
imports: from abc import ABCMeta
  from typing import Iterator, Collection, TypeVar, Union, Callable
  from sqlalchemy import text
label_desc: Use image node_id 1 for calling the ModelMappedClassMeta obj's underlying member method code with example usage: obj.__new__(mcls, name, bases, namespace) and returns: type_, mcls, cls