code: def test_nondiff_back():
      x = 1.0
      y = (jnp.array(1.0), object())
      assert tree_allclose(eqxi.nondifferentiable_backward(x), x)
      assert tree_allclose(
          jax.jit(eqxi.nondifferentiable_backward)(x), jnp.array(x)
      )
      assert tree_allclose(eqxi.nondifferentiable_backward(y), y)
      assert tree_allclose(
          eqx.filter_jit(
              eqxi.nondifferentiable_backward, donate="none"
          )(y),
          y,
      )
  
      x1, x2 = jax.jvp(eqxi.nondifferentiable_backward, (x,), (x,))
      x3, x4 = jax.jvp(
          jax.jit(eqxi.nondifferentiable_backward), (x,), (x,)
      )
      assert tree_allclose(x1, x)
      assert tree_allclose(x2, x)
      assert tree_allclose(x3, jnp.array(x))
      assert tree_allclose(x4, jnp.array(x))
  
      with pytest.raises(RuntimeError):
          jax.grad(eqxi.nondifferentiable_backward)(x)
      with pytest.raises(RuntimeError):
          jax.jit(jax.grad(eqxi.nondifferentiable_backward))(x)
  
file_path: equinox/tests/test_nontraceable.py
imports: from typing import cast
  import equinox
  import equinox.internal
  import jax
  import jax.core
  import jax.numpy
  import jax.tree_util
  import pytest
  from .helpers import tree_allclose
label_desc: Use image node_id 2 for calling a global function with example usage: test_nondiff_back() without return types