code: def testNoGradientsNiceError(self):
      dtype = np.float32
  
      def fn(x, y):
          return x**2 + tf.stop_gradient(y) ** 2
  
      fn_args = [dtype(3), dtype(3)]
      # Convert function input to a list of tensors
      fn_args = [
          tf.convert_to_tensor(value=arg, name="arg{}".format(i))
          for i, arg in enumerate(fn_args)
      ]
      if tf.executing_eagerly():
          with self.assertRaisesRegexp(
              ValueError,
              "Encountered `None`.*\n.*fn_arg_list.*\n.*None",
          ):
              util.maybe_call_fn_and_grads(fn, fn_args)
      else:
          with self.assertRaisesRegexp(
              ValueError,
              "Encountered `None`.*\n.*fn_arg_list.*arg1.*\n.*None",
          ):
              util.maybe_call_fn_and_grads(fn, fn_args)
  
imports: import collections
  import warnings
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc.internal import util
label_desc: Use image node_id 4 for calling the GradientTest obj's underlying member method code with example usage: obj.testNoGradientsNiceError() and returns: unknown