code: def testPoissonLogPmfContinuousRelaxation(self):
      batch_size = 12
      lam = tf.constant([3.0] * batch_size)
      x = tf.constant(
          [-3.0, -0.5, 0.0, 2.0, 2.2, 3.0, 3.1, 4.0, 5.0, 5.5, 6.0, 7.0]
      )
      poisson = self._make_poisson(
          rate=lam,
          force_probs_to_zero_outside_support=False,
          validate_args=False,
      )
  
      expected_continuous_log_pmf = (
          x * poisson.log_rate_parameter()
          - tf.math.lgamma(1.0 + x)
          - poisson.rate_parameter()
      )
      expected_continuous_log_pmf = tf.where(
          x >= 0.0,
          expected_continuous_log_pmf,
          dtype_util.as_numpy_dtype(expected_continuous_log_pmf.dtype)(
              -np.inf
          ),
      )
      expected_continuous_pmf = tf.exp(expected_continuous_log_pmf)
  
      log_pmf = poisson.log_prob(x)
      self.assertEqual((batch_size,), log_pmf.shape)
      self.assertAllClose(
          self.evaluate(log_pmf),
          self.evaluate(expected_continuous_log_pmf),
      )
  
      pmf = poisson.prob(x)
      self.assertEqual((batch_size,), pmf.shape)
      self.assertAllClose(
          self.evaluate(pmf), self.evaluate(expected_continuous_pmf)
      )
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import poisson
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import implementation_selection
  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 PoissonTest obj's underlying member method code with example usage: obj.testPoissonLogPmfContinuousRelaxation() without return types