code: def filter_primitive_jvp(rule):
      """
      The input tangents (to the wrapped rule) will be a PyTree with the same
      structure as the input primals. `None` indicates symbolic zero tangents,
      in particular for non-JAX-array-likes.
  
      The output tangents are expected to match the output primals, necessarily
      with `None` for all non-JAX-array-likes.
      """
  
      def _wrapper(primals, tangents, *, treedef, static, flatten):
          tangents = [
              None if type(t) is ad.Zero else t for t in tangents
          ]
          tangents_static = [
              x if x is _missing_dynamic else None for x in static
          ]
          primals = jtu.tree_unflatten(
              treedef, _combine(primals, static)
          )
          tangents = jtu.tree_unflatten(
              treedef, _combine(tangents, tangents_static)
          )
          primals_out, tangents_out = rule(primals, tangents)
          flat_primals_out, flat_tangents_out = flatten(
              primals_out, tangents_out
          )
          flat_tangents_out = [
              _zero_from_primal(p) if t is None else t
              for p, t in zip(flat_primals_out, flat_tangents_out)
          ]
          return flat_primals_out, flat_tangents_out
  
      return _wrapper
  
imports: import functools
  from typing import Any
  import jax
  import jax.core
  import jax.interpreters.ad
  import jax.interpreters.batching
  import jax.interpreters.mlir
  import jax.tree_util
  from jaxtyping import PyTree
  from .._filters import combine, is_array, is_array_like, partition
  from .._tree import tree_equal
label_desc: Use image node_id 11 for calling a global function with example usage: filter_primitive_jvp(rule) and returns: _wrapper, flat_primals_out,  flat_tangents_out