code: def testLogProb(self):
      t = np.array(1.0, dtype=np.float64)
      p = np.array(0.1, dtype=np.float64)  # P(x=1)
      dist = relaxed_bernoulli.RelaxedBernoulli(
          t, probs=p, validate_args=True
      )
      xs = np.array([0.1, 0.3, 0.5, 0.9], dtype=np.float64)
      # analytical density from Maddison et al. 2016
      alpha = np.array(p / (1 - p), dtype=np.float64)
      expected_log_pdf = (
          np.log(t)
          + np.log(alpha)
          + (-t - 1) * (np.log(xs) + np.log(1 - xs))
          - 2 * np.log(alpha * np.power(xs, -t) + np.power(1 - xs, -t))
      )
      log_pdf = self.evaluate(dist.log_prob(xs))
      self.assertAllClose(expected_log_pdf, log_pdf)
  
imports: import numpy
  import scipy.special
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import relaxed_bernoulli
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 7 for calling the RelaxedBernoulliTest obj's underlying member method code with example usage: obj.testLogProb() without return types