code: def _store(
      cls,
      name: str,
      message: str,
      name_to_item: dict[str, "EnumerationItem"],
      index_to_message: list[str],
  ) -> int:
      try:
          our_item = name_to_item[name]
      except KeyError:
          our_index = len(index_to_message)
          name_to_item[name] = EnumerationItem(
              np.array(our_index, dtype=np.int32), cls
          )
          index_to_message.append(message)
          return our_index
      else:
          our_index = our_item._value.item()
          existing_message = index_to_message[our_index]
          if message != existing_message:
              warnings.warn(
                  f"Enumeration has duplicate incompatible values for {name}. Using the "
                  f"latest, which is '{message}'."
              )
          index_to_message[our_index] = message
          return our_index
  
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 2 for calling a global function with example usage: _store(cls, name, message, name_to_item, index_to_message) and returns: our_index, our_index