code: def unbox_random_state(typ, obj, c):
      """Convert a `RandomState` object to a native `RandomStateNumbaModel` structure.
  
      Note that this will create a 'fake' structure which will just get the
      `RandomState` objects accepted in Numba functions but the actual information
      of the Numba's random state is stored internally and can be accessed
      anytime using ``numba._helperlib.rnd_get_np_state_ptr()``.
      """
      interval = cgutils.create_struct_proxy(typ)(c.context, c.builder)
      is_error = cgutils.is_not_null(c.builder, c.pyapi.err_occurred())
      return NativeValue(interval._getvalue(), is_error=is_error)
  
imports: from textwrap import dedent, indent
  from typing import Any, Callable, Optional
  import numba.np.unsafe.ndarray
  import numpy
  from numba import _helperlib, types
  from numba.core import cgutils
  from numba.extending import NativeValue, box, models, register_model, typeof_impl, unbox
  from numpy.random import RandomState
  import pytensor.tensor.random.basic
  from pytensor.graph.basic import Apply
  from pytensor.graph.op import Op
  from pytensor.link.numba.dispatch import basic
  from pytensor.link.numba.dispatch.basic import numba_funcify, numba_typify
  from pytensor.link.utils import compile_function_src, get_name_for_object, unique_name_generator
  from pytensor.tensor.basic import get_vector_length
  from pytensor.tensor.random.type import RandomStateType
label_desc: Use image node_id 2 for calling a global function with example usage: unbox_random_state(typ, obj, c) and returns: NativeValue