code: def __new__(mcs, cls_name, bases, namespace):
      assert "_name_to_item" not in namespace
      assert "_index_to_message" not in namespace
      assert "_base_offsets" not in namespace
      name_to_item = {}
      index_to_message = []
      base_offsets = {}
      new_namespace = dict(
          _name_to_item=name_to_item,
          _index_to_message=index_to_message,
          _base_offsets=base_offsets,
      )
      if (
          cls_name == "Enumeration"
          and "Enumeration" not in globals().keys()
      ):
          new_namespace["promote"] = namespace.pop("promote")
          new_namespace["where"] = namespace.pop("where")
      else:
          if "promote" in namespace:
              raise ValueError(
                  "Cannot have enumeration item with name `promote`, as this "
                  "conflicts with the classmethod of this name"
              )
          if "where" in namespace:
              raise ValueError(
                  "Cannot have enumeration item with name `where`, as this conflicts "
                  "with the classmethod of this name"
              )
      for name, value in namespace.items():
          if _magic(name):
              new_namespace[name] = value
      cls = super().__new__(mcs, cls_name, bases, new_namespace)
      for original_base in bases:
          # skip Enumeration and object
          for base in original_base.__mro__[:-2]:
              if not issubclass(base, Enumeration):
                  raise ValueError(
                      "Cannot subclass enumerations with non-enumerations."
                  )
              if base not in base_offsets.keys():
                  offsets = np.zeros(len(base), dtype=np.int32)
                  for name, base_item in base._name_to_item.items():
                      base_index = base_item._value.item()
                      message = base._index_to_message[base_index]
                      our_index = _store(
                          cls,
                          name,
                          message,
                          name_to_item,
                          index_to_message,
                      )
                      offsets[base_index] = our_index
                  base_offsets[base] = np.asarray(offsets)
      for name, message in namespace.items():
          if not _magic(name):
              _store(cls, name, message, name_to_item, index_to_message)
      if "__doc__" not in cls.__dict__ or cls.__doc__ is None:
          doc_pieces = [
              """An
  [enumeration](https://docs.kidger.site/equinox/api/enumerations/), with the
  following entries:
  """
          ]
          for name, item in name_to_item.items():
              message = index_to_message[item._value.item()]
              if message == "":
                  doc_pieces.append(f"- `{name}`")
              else:
                  message = message.replace("\n", "\n    ")
                  doc_pieces.append(f"- `{name}`: {message}")
          cls.__doc__ = "\n\n".join(doc_pieces)
      return cls
  
imports: import warnings
  from typing import Any, cast, TYPE_CHECKING, Union
  import jax._src.traceback_util
  import jax.core
  import jax.numpy
  import numpy
  from jaxtyping import Array, ArrayLike, Bool, Int
  from ._doc_utils import doc_repr
  from ._errors import branched_error_if
  from ._module import field, Module
label_desc: Use image node_id 1 for calling the _EnumerationMeta obj's underlying member method code with example usage: obj.__new__(mcs, cls_name, bases, namespace) and returns: cls