code: def test_filter_value_and_grad(getkey):
      a = jrandom.normal(getkey(), (2, 3))
  
      @eqx.filter_value_and_grad
      def f(x):
          return jnp.sum(x)
  
      val, grad = f(a)
      assert tree_allclose(val, jnp.sum(a))
      assert tree_allclose(grad, jnp.ones((2, 3)))
  
imports: import warnings
  from typing import Union
  import equinox
  import jax
  import jax.numpy
  import jax.random
  import jax.tree_util
  import numpy
  import pytest
  from .helpers import tree_allclose
label_desc: Use image node_id 2 for calling a global function with example usage: test_filter_value_and_grad(getkey) and returns: jnp