code: def __getitem__(self, key: Key | int) -> Leaf | State:
      if isinstance(key, int):
          key = str(key)
      value = self._mapping[key]
      if isinstance(value, Variable):
          return value.value
      return State(value)
  
imports: from __future__ import annotations
  import typing
  import jax
  import jax.tree_util
  from flax import traverse_util
  from flax.experimental.nnx.nnx import filterlib, reprlib
  from flax.experimental.nnx.nnx.variables import Variable
label_desc: Use image node_id 4 for calling the State obj's underlying member method code with example usage: obj.__getitem__(key) and returns: State, value