code: def check_vjp(
      f, f_vjp, args, atol=None, rtol=None, eps=EPS, err_msg=""
  ):
      atol = _merge_tolerance(atol, default_gradient_tolerance)
      rtol = _merge_tolerance(rtol, default_gradient_tolerance)
      _rand_like = partial(rand_like, np.random.RandomState(0))
      v_out, vjpfun = f_vjp(*args)
      v_out_expected = f(*args)
      check_close(
          v_out,
          v_out_expected,
          atol=atol,
          rtol=rtol,
          err_msg=f"{err_msg} primal" if err_msg else "primal",
      )
      tangent = tree_map(_rand_like, args)
      tangent_out = numerical_jvp(f, args, tangent, eps=eps)
      cotangent = tree_map(_rand_like, v_out)
      cotangent_out = conj(vjpfun(conj(cotangent)))
      ip = inner_prod(tangent, cotangent_out)
      ip_expected = inner_prod(tangent_out, cotangent)
      check_close(
          ip,
          ip_expected,
          atol=atol,
          rtol=rtol,
          err_msg=(
              f"{err_msg} cotangent projection"
              if err_msg
              else "cotangent projection"
          ),
      )
  
imports: from functools import partial
  import operator
  from jax._src import api
  from jax._src import config
  from jax._src import dtypes
  from jax._src.tree_util import tree_map, tree_reduce
  import numpy
label_desc: Use image node_id 17 for calling a global function with example usage: check_vjp(f, f_vjp, args, atol, rtol, eps, err_msg) without return types