code: def test_fn2fn_nocustom_idempotent():
      def fn(x):
          x = jnp.asarray(x)
          x = x + 1
          x = x * 2
          return x
  
      finalised_fn = eqxi.finalise_fn(fn)
      assert tree_allclose(fn(1), finalised_fn(1))
      assert tree_allclose(fn(5), finalised_fn(5))
      assert tree_allclose(fn(-1), finalised_fn(-1))
  
      jaxpr = jax.make_jaxpr(fn)(1)
      jaxpr = cast(jax.core.ClosedJaxpr, jaxpr)
      finalised_jaxpr = jax.make_jaxpr(finalised_fn)(1)
      finalised_jaxpr = cast(jax.core.ClosedJaxpr, finalised_jaxpr)
      _assert_jaxpr_equal(finalised_jaxpr, jaxpr)
  
file_path: equinox/tests/test_finalise_jaxpr.py
imports: from typing import cast
  import equinox.internal
  import jax
  import jax.core
  import jax.lax
  import jax.numpy
  from .helpers import tree_allclose
label_desc: Use image node_id 6 for calling a global function with example usage: test_fn2fn_nocustom_idempotent() and returns: x