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