code: def _to_array(x):
      if isinstance(x, jax.interpreters.ad.JVPTracer):
          return _to_array(x.primal)
      elif isinstance(
          x, jax.interpreters.partial_eval.DynamicJaxprTracer
      ):
          return _to_array(x.aval)
      elif isinstance(x, jax.interpreters.batching.BatchTracer):
          return _to_array(x.val)
      return x
  
imports: import os
  import jax
  from typing import Union, Optional
  import jaxlib.xla_extension
  import ivy
  from ivy.functional.backends.jax import JaxArray
  from ivy.functional.ivy.device import _shift_native_arrays_on_default_device, Profiler
label_desc: Use image node_id 1 for calling a global function with example usage: _to_array(x) and returns: x, _to_array, _to_array, _to_array