code: def backward_nan(x, name=None, terminate=True):
      """Debug NaNs that only occur on the backward pass.
  
      **Arguments:**
  
      - `x`: a variable to intercept.
      - `name`: an optional name to appear in printed debug statements.
      - `terminate`: whether to halt the computation if a NaN cotangent is found. If
          `True` then an error will be raised via [`equinox.error_if`][]. (So you can
          also arrange for a breakpoint to trigger by setting `EQX_ON_ERROR`
          appropriately.)
  
      **Returns:**
  
      The `x` argument is returned unchanged.
  
      As a side-effect, both the primal and the cotangent for `x` will be printed out
      during the backward pass.
      """
      return _backward_nan(x, name, terminate)
  
file_path: equinox/equinox/debug/_backward_nan.py
imports: from typing import Any
  import jax
  import jax._src.traceback_util
  import jax.core
  import jax.numpy
  import jax.tree_util
  from .._ad import filter_custom_vjp
  from .._errors import error_if
  from .._filters import filter, is_array_like
  from .._module import Module
  from .._pretty_print import tree_pformat
label_desc: Use image node_id 1 for calling a global function with example usage: backward_nan(x, name, terminate) and returns: _backward_nan