code: def assert_no_none_grad(kernel, method, wrt_vars, grads):
      for var, grad in zip(wrt_vars, grads):
          # For the GeneralizedMatern kernel, gradients with respect to `df` don't
          # exist.
          if (
              tensor_util.is_ref(var)
              and var.name.strip("_0123456789:") == "df"
          ):
              continue
          if grad is None:
              raise AssertionError(
                  "Missing `{}` -> {} grad for kernel {}".format(
                      method, var, kernel
                  )
              )
  
file_path: probability/tensorflow_probability/python/math/psd_kernels/psd_kernel_properties_test.py
imports: import collections
  from absl.testing import parameterized
  import hypothesis
  from hypothesis import strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.psd_kernels import hypothesis_testlib
label_desc: Use image node_id 1 for calling a global function with example usage: assert_no_none_grad(kernel, method, wrt_vars, grads) without return types