code: def testFiniteGradientAtDifficultPoints(self):
      def make_fn(dtype, attr):
          x = np.array(
              [-100.0, -20.0, -5.0, 0.0, 5.0, 20.0, 100.0]
          ).astype(dtype)
          return lambda m, s: getattr(  # pylint: disable=g-long-lambda
              normal.Normal(loc=m, scale=s, validate_args=True), attr
          )(x)
  
      for dtype in np.float32, np.float64:
          for attr in [
              "cdf",
              "log_cdf",
              "survival_function",
              "log_survival_function",
              "log_prob",
              "prob",
          ]:
              value, grads = self.evaluate(
                  gradient.value_and_gradient(
                      make_fn(dtype, attr),
                      [tf.constant(0, dtype), tf.constant(1, dtype)],
                  )
              )
              self.assertAllFinite(value)
              self.assertAllFinite(grads[0])
              self.assertAllFinite(grads[1])
  
imports: import math
  import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 12 for calling the NormalTest obj's underlying member method code with example usage: obj.testFiniteGradientAtDifficultPoints() and returns: function