code: def test_nondiff():
      x = 1.0
      y = (jnp.array(1.0), object())
      assert tree_allclose(eqxi.nondifferentiable(x), x)
      assert tree_allclose(
          jax.jit(eqxi.nondifferentiable)(x), jnp.array(x)
      )
      assert tree_allclose(eqxi.nondifferentiable(y), y)
      assert tree_allclose(
          eqx.filter_jit(eqxi.nondifferentiable, donate="none")(y), y
      )
  
      with pytest.raises(RuntimeError):
          jax.jvp(eqxi.nondifferentiable, (x,), (x,))
      with pytest.raises(RuntimeError):
          jax.jvp(jax.jit(eqxi.nondifferentiable), (x,), (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 1 for calling a global function with example usage: test_nondiff() without return types