code: def __getitem__(self, key: str | int) -> Variable[tp.Any]:
      if isinstance(key, int):
          key = str(key)
  
      value = self._mapping[key]
  
      if not isinstance(value, Variable):
          raise KeyError(f"Variable '{key}' not found.")
  
      return 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 2 for calling the StateVariablesMapping obj's underlying member method code with example usage: obj.__getitem__(key) and returns: value