code: def testExponentiallyModifiedGaussianLogPDF(self):
      batch_size = 6
      mu = tf.constant([3.0] * batch_size, dtype=self.dtype)
      sigma = tf.constant(
          [math.sqrt(10.0)] * batch_size, dtype=self.dtype
      )
      rate = tf.constant([2.0] * batch_size, dtype=self.dtype)
      x = np.array([-2.5, 2.5, 4.0, 0.0, -1.0, 2.0], dtype=self.dtype)
      exgaussian = emg.ExponentiallyModifiedGaussian(
          loc=mu, scale=sigma, rate=rate, validate_args=True
      )
  
      log_pdf = exgaussian.log_prob(x)
      self.assertAllEqual(
          self.evaluate(exgaussian.batch_shape_tensor()), log_pdf.shape
      )
      self.assertAllEqual(
          self.evaluate(exgaussian.batch_shape_tensor()),
          self.evaluate(log_pdf).shape,
      )
      self.assertAllEqual(exgaussian.batch_shape, log_pdf.shape)
      self.assertAllEqual(
          exgaussian.batch_shape, self.evaluate(log_pdf).shape
      )
  
      pdf = exgaussian.prob(x)
      self.assertAllEqual(
          self.evaluate(exgaussian.batch_shape_tensor()), pdf.shape
      )
      self.assertAllEqual(
          self.evaluate(exgaussian.batch_shape_tensor()),
          self.evaluate(pdf).shape,
      )
      self.assertAllEqual(exgaussian.batch_shape, pdf.shape)
      self.assertAllEqual(
          exgaussian.batch_shape, self.evaluate(pdf).shape
      )
  
      expected_log_pdf = sp_stats.exponnorm(
          1.0 / (self.evaluate(rate) * self.evaluate(sigma)),
          loc=self.evaluate(mu),
          scale=self.evaluate(sigma),
      ).logpdf(x)
      self.assertAllClose(
          expected_log_pdf, self.evaluate(log_pdf), atol=1e-5, rtol=1e-5
      )
      self.assertAllClose(
          np.exp(expected_log_pdf),
          self.evaluate(pdf),
          atol=1e-5,
          rtol=1e-5,
      )
  
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 6 for calling the _ExponentiallyModifiedGaussianTest obj's underlying member method code with example usage: obj.testExponentiallyModifiedGaussianLogPDF() without return types