code: def _assert_jaxpr_equal(
      jaxpr1: jax.core.ClosedJaxpr, jaxpr2: jax.core.ClosedJaxpr
  ):
      assert jaxpr1.consts == jaxpr2.consts
      jaxpr1 = jaxpr1.jaxpr
      jaxpr2 = jaxpr2.jaxpr
      _assert_vars_equal(
          jaxpr1, jaxpr2, ("invars", "outvars", "constvars")
      )
      for eqn1, eqn2 in _safe_zip(jaxpr1.eqns, jaxpr2.eqns):
          assert eqn1.primitive == eqn2.primitive
          assert eqn1.effects == eqn2.effects
          assert eqn1.params == eqn2.params
          _assert_vars_equal(eqn1, eqn2, ("invars", "outvars"))
  
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 3 for calling a global function with example usage: _assert_jaxpr_equal(jaxpr1, jaxpr2) without return types