code: def test_error_if():
      class A(eqxi.Enumeration):
          a = "hi"
  
      token = jnp.array(True)
      A.a.error_if(token, False)
      eqx.filter_jit(A.a.error_if)(token, False)
      with pytest.raises(Exception):
          A.a.error_if(token, True)
      with pytest.raises(Exception):
          eqx.filter_jit(A.a.error_if)(token, True)
  
file_path: equinox/tests/test_enum.py
imports: import equinox
  import equinox.internal
  import jax
  import jax.numpy
  import jax.tree_util
  import pytest
  from .helpers import tree_allclose
label_desc: Use image node_id 9 for calling a global function with example usage: test_error_if() without return types