code: def test_bug170030378(self):
      n_item = 50
      n_rater = 7
  
      stream = test_util.test_seed_stream()
      weight = self.evaluate(
          sample_lib.Sample(
              dirichlet.Dirichlet([0.25, 0.25]), n_item
          ).sample(seed=stream())
      )
      mixture_dist = categorical.Categorical(
          probs=weight
      )  # batch_shape=[50]
  
      rater_sensitivity = self.evaluate(
          sample_lib.Sample(beta.Beta(5.0, 1.0), n_rater).sample(
              seed=stream()
          )
      )
      rater_specificity = self.evaluate(
          sample_lib.Sample(beta.Beta(2.0, 5.0), n_rater).sample(
              seed=stream()
          )
      )
  
      probs = tf.stack([rater_sensitivity, rater_specificity])[
          None, ...
      ]
  
      components_dist = (
          batch_broadcast.BatchBroadcast(  # batch_shape=[50, 2]
              independent.Independent(
                  bernoulli.Bernoulli(probs=probs),
                  reinterpreted_batch_ndims=1,
              ),
              [50, 2],
          )
      )
  
      obs_dist = mixture_same_family.MixtureSameFamily(
          mixture_dist, components_dist
      )
  
      observed = self.evaluate(obs_dist.sample(seed=stream()))
      mixture_logp = obs_dist.log_prob(observed)
  
      expected_logp = tf.math.reduce_logsumexp(
          tf.math.log(weight)
          + components_dist.distribution.log_prob(
              observed[:, None, ...]
          ),
          axis=-1,
      )
      self.assertAllClose(expected_logp, mixture_logp)
  
imports: import hypothesis
  import hypothesis.strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import batch_broadcast
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import beta
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import dirichlet
  from tensorflow_probability.python.distributions import hypothesis_testlib
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import mixture_same_family
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.distributions import uniform
  from tensorflow_probability.python.distributions import von_mises_fisher
  from tensorflow_probability.python.distributions import wishart
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.random import random_ops
label_desc: Use image node_id 10 for calling the _BatchBroadcastTest obj's underlying member method code with example usage: obj.test_bug170030378() without return types