code: def testLogProbAccuracy(self, dist_name, data):
      self.skip_if_tf1()
      dist = data.draw(
          dhps.distributions(
              dist_name=dist_name,
              # Accuracy tools can't handle batches (yet?)
              batch_shape=(),
              # Variables presumably do not affect the numerics
              enable_vars=False,
              # Checking that samples pass validations (including in 64-bit
              # arithmetic) is left for another test
              validate_args=False,
          )
      )
      seed = test_util.test_seed(sampler_type="stateless")
      with tfp_hps.no_tf_rank_errors():
          sample = dist.sample(seed=seed)
      if sample.dtype.is_floating:
          hp.assume(
              self.evaluate(tf.reduce_all(~tf.math.is_nan(sample)))
          )
      hp.note("Testing on sample {}".format(sample))
  
      self.assertIsInstance(dist, tf.__internal__.CompositeTensor)
      as_tensors = tf.nest.flatten(dist, expand_composites=True)
  
      def log_prob_function(tensors, x):
          dist_ = tf.nest.pack_sequence_as(
              dist, tensors, expand_composites=True
          )
          return dist_.log_prob(x)
  
      with tfp_hps.finite_ground_truth_only():
          badness = nt.excess_wrong_bits(
              log_prob_function, as_tensors, sample
          )
      # TODO(axch): Lower the acceptable badness to 4, which corresponds
      # to slightly better accuracy than 1e-6 relative error for
      # well-conditioned functions.
      self.assertAllLess(badness, 20)
  
imports: import collections
  from absl.testing import parameterized
  import hypothesis
  from hypothesis import strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import hypothesis_testlib
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import numerics_testing
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.psd_kernels import hypothesis_testlib
label_desc: Use image node_id 2 for calling the DistributionAccuracyTest obj's underlying member method code with example usage: obj.testLogProbAccuracy(dist_name, data) and returns: dist_