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, p: getattr(  # pylint: disable=g-long-lambda
                  generalized_normal.GeneralizedNormal(
                      loc=m, scale=s, power=p, validate_args=True
                  ),
                  attr,
              )(x)
          )
  
      # TODO(b/157524947): add 'log_cdf', currently fails at -100, -20, in fp32.
      for attr in ["log_prob", "prob", "cdf", "survival_function"]:
          value, grads = self.evaluate(
              gradient.value_and_gradient(
                  make_fn(self.dtype, attr),
                  [
                      tf.constant(0, self.dtype),  # mu
                      tf.constant(1, self.dtype),  # scale
                      tf.constant(2.1, self.dtype),
                  ],
              )
          )  # power
          self.assertAllFinite(value)
          self.assertAllFinite(grads[0])  # d/d mu
          self.assertAllFinite(grads[1])  # d/d scale
          self.assertAllFinite(grads[2])
  
imports: import math
  import numpy
  from scipy import stats
  from scipy.special import gamma
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import generalized_normal
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 11 for calling the _GeneralizedNormalTest obj's underlying member method code with example usage: obj.testFiniteGradientAtDifficultPoints() and returns: function