code: def testLogProbWorksCorrectly(self):
      predicted_linear_response = (
          np.stack(
              [np.linspace(-5.0, -1e-3, 11), np.linspace(1e-3, 5, 11)]
          )
          .reshape(2, 11, 1)
          .astype(self.dtype)
      )
      actual_mean = self.expected.linear_model_to_mean_fn(
          predicted_linear_response
      )
      distribution = self.expected.distribution_fn(actual_mean)
      response = tf.cast(
          distribution.sample(seed=test_util.test_seed()), self.dtype
      )
      response = tf.identity(
          response, name="response"
      )  # Disable bijector cache.
      expected_log_prob = distribution.log_prob(
          response, name="expected_log_prob"
      )
      actual_log_prob = self.model.log_prob(
          response, predicted_linear_response
      )
      [
          expected_log_prob_,
          actual_log_prob_,
      ] = self.evaluate(
          [
              expected_log_prob,
              actual_log_prob,
          ]
      )
      self.assertAllClose(
          expected_log_prob_, actual_log_prob_, atol=1e-6, rtol=1e-4
      )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import binomial
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import negative_binomial
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import poisson
  from tensorflow_probability.python.glm import family
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 3 for calling the _GLMTestHarness obj's underlying member method code with example usage: obj.testLogProbWorksCorrectly() without return types