code: def test_pmap_vmap():
      num_traces = 0
  
      def f(x):
          nonlocal num_traces
          num_traces += 1
          return x + 1
  
      out = filter_pmap(eqx.filter_vmap(f))(jnp.array([[1, 2]]))
      assert shaped_allclose(out, jnp.array([[2, 3]]))
      assert num_traces == 2  # eval_shape, pmap
  
      out = filter_pmap(eqx.filter_vmap(f))(jnp.array([[2, 3]]))
      assert shaped_allclose(out, jnp.array([[3, 4]]))
      assert num_traces == 2
  
imports: import functools
  from typing import Any, Union
  import equinox
  import jax
  import jax.numpy
  import jax.random
  import jax.tree_util
  import pytest
  from .helpers import tree_allclose
label_desc: Use image node_id 10 for calling a global function with example usage: test_pmap_vmap() and returns: unknown