code: def __new__(
      cls,
      name: str,
      bases: Tuple[Type[Any], ...],
      class_dict: Dict[str, Any],
      **kwargs: Any,
  ) -> Any:
      relationships: Dict[str, RelationshipInfo] = {}
      dict_for_pydantic = {}
      original_annotations = get_annotations(class_dict)
      pydantic_annotations = {}
      relationship_annotations = {}
      for k, v in class_dict.items():
          if isinstance(v, RelationshipInfo):
              relationships[k] = v
          else:
              dict_for_pydantic[k] = v
      for k, v in original_annotations.items():
          if k in relationships:
              relationship_annotations[k] = v
          else:
              pydantic_annotations[k] = v
      dict_used = {
          **dict_for_pydantic,
          "__weakref__": None,
          "__sqlmodel_relationships__": relationships,
          "__annotations__": pydantic_annotations,
      }
      # Duplicate logic from Pydantic to filter config kwargs because if they are
      # passed directly including the registry Pydantic will pass them over to the
      # superclass causing an error
      allowed_config_kwargs: Set[str] = {
          key
          for key in dir(BaseConfig)
          if not (
              key.startswith("__") and key.endswith("__")
          )  # skip dunder methods and attributes
      }
      config_kwargs = {
          key: kwargs[key]
          for key in kwargs.keys() & allowed_config_kwargs
      }
      new_cls = super().__new__(
          cls, name, bases, dict_used, **config_kwargs
      )
      new_cls.__annotations__ = {
          **relationship_annotations,
          **pydantic_annotations,
          **new_cls.__annotations__,
      }
  
      def get_config(name: str) -> Any:
          config_class_value = get_config_value(
              model=new_cls, parameter=name, default=Undefined
          )
          if config_class_value is not Undefined:
              return config_class_value
          kwarg_value = kwargs.get(name, Undefined)
          if kwarg_value is not Undefined:
              return kwarg_value
          return Undefined
  
      config_table = get_config("table")
      if config_table is True:
          # If it was passed by kwargs, ensure it's also set in config
          set_config_value(
              model=new_cls, parameter="table", value=config_table
          )
          for k, v in get_model_fields(new_cls).items():
              col = get_column_from_field(v)
              setattr(new_cls, k, col)
          # Set a config flag to tell FastAPI that this should be read with a field
          # in orm_mode instead of preemptively converting it to a dict.
          # This could be done by reading new_cls.model_config['table'] in FastAPI, but
          # that's very specific about SQLModel, so let's have another config that
          # other future tools based on Pydantic can use.
          set_config_value(
              model=new_cls,
              parameter="read_from_attributes",
              value=True,
          )
          # For compatibility with older versions
          # TODO: remove this in the future
          set_config_value(
              model=new_cls, parameter="read_with_orm_mode", value=True
          )
  
      config_registry = get_config("registry")
      if config_registry is not Undefined:
          config_registry = cast(registry, config_registry)
          # If it was passed by kwargs, ensure it's also set in config
          set_config_value(
              model=new_cls, parameter="registry", value=config_table
          )
          setattr(
              new_cls, "_sa_registry", config_registry
          )  # noqa: B010
          setattr(
              new_cls, "metadata", config_registry.metadata
          )  # noqa: B010
          setattr(new_cls, "__abstract__", True)  # noqa: B010
      return new_cls
  
imports: import ipaddress
  import uuid
  import weakref
  from datetime import date, datetime, time, timedelta
  from decimal import Decimal
  from enum import Enum
  from pathlib import Path
  from typing import AbstractSet, Any, Callable, ClassVar, Dict, List, Mapping, Optional, Sequence, Set, Tuple, Type, TypeVar, Union, cast, overload
  from pydantic import BaseModel
  from pydantic.fields import FieldInfo
  from sqlalchemy import Boolean, Column, Date, DateTime, Float, ForeignKey, Integer, Interval, Numeric, inspect
  from sqlalchemy import Enum
  from sqlalchemy.orm import Mapped, RelationshipProperty, declared_attr, registry, relationship
  from sqlalchemy.orm.attributes import set_attribute
  from sqlalchemy.orm.decl_api import DeclarativeMeta
  from sqlalchemy.orm.instrumentation import is_instrumented
  from sqlalchemy.sql.schema import MetaData
  from sqlalchemy.sql.sqltypes import LargeBinary, Time
  from typing_extensions import Literal, deprecated, get_origin
  from ._compat import IS_PYDANTIC_V2, BaseConfig, ModelField, ModelMetaclass, Representation, SQLModelConfig, Undefined, UndefinedType, _calculate_keys, finish_init, get_annotations, get_config_value, get_field_metadata, get_model_fields, get_relationship_to, get_type_from_field, is_field_noneable, is_table_model_class, post_init_field_info, set_config_value, set_fields_set, sqlmodel_init, sqlmodel_validate
  from .sql.sqltypes import GUID, AutoString
label_desc: Use image node_id 3 for calling the SQLModelMetaclass obj's underlying member method code with example usage: obj.__new__(cls, name, bases, class_dict) and returns: new_cls, Undefined, config_class_value, kwarg_value