code: def _quote(x, indent, out):
      """
      Work around JAX's ndarray not supporting reproducible repr.
      """
      # After JAX 0.4, jnp.ones(3) is no longer a DeviceArray, but an ndarray.
      # In addition, a tracer is also an ndarray - so we need to handler it
      # separately here.
      if isinstance(x, Tracer):
          # Default implementation.
          line = re.sub("\n\\s*", " ", repr(x))
          out.append((indent, line))
          return
      if x.size >= quote.printoptions["threshold"]:
          data = "..." + " x ".join(str(d) for d in x.shape) + "..."
      else:
          data = repr(x.copy().tolist())
      out.append((indent, f"np.array({data}, dtype=np.{x.dtype})"))
  
file_path: funsor/funsor/jax/__init__.py
imports: import re
  from jax.core import Tracer
  from jax.numpy import ndarray
  from funsor.tensor import tensor_to_funsor
  from funsor.terms import to_funsor
  from funsor.util import quote
  from .None import distributions
  from .None import ops
label_desc: Use image node_id 1 for calling a global function with example usage: _quote(x, indent, out) without return types