code: def _testMnistLike(self, static_shape):
      sample_shape = [4, 5]
      batch_shape = [10]
      image_shape = [28, 28, 1]
      logits = (
          3
          * np.random.random_sample(batch_shape + image_shape).astype(
              np.float32
          )
          - 1
      )
  
      def expected_log_prob(x, logits):
          return (
              (x * logits - np.log1p(np.exp(logits)))
              .sum(-1)
              .sum(-1)
              .sum(-1)
          )
  
      logits_ph = tf1.placeholder_with_default(
          logits, shape=logits.shape if static_shape else None
      )
      ind = independent.Independent(
          distribution=bernoulli.Bernoulli(logits=logits_ph),
          validate_args=True,
      )
      x = ind.sample(sample_shape, seed=test_util.test_seed())
      log_prob_x = ind.log_prob(x)
      [
          x_,
          actual_log_prob_x,
          ind_batch_shape,
          ind_event_shape,
          x_shape,
          log_prob_x_shape,
      ] = self.evaluate(
          [
              x,
              log_prob_x,
              ind.batch_shape_tensor(),
              ind.event_shape_tensor(),
              tf.shape(x),
              tf.shape(log_prob_x),
          ]
      )
  
      if static_shape:
          ind_batch_shape = ind.batch_shape
          ind_event_shape = ind.event_shape
          x_shape = x.shape
          log_prob_x_shape = log_prob_x.shape
  
      self.assertAllEqual(batch_shape, ind_batch_shape)
      self.assertAllEqual(image_shape, ind_event_shape)
      self.assertAllEqual(
          sample_shape + batch_shape + image_shape, x_shape
      )
      self.assertAllEqual(sample_shape + batch_shape, log_prob_x_shape)
      self.assertAllClose(
          expected_log_prob(x_, logits),
          actual_log_prob_x,
          rtol=1.5e-6,
          atol=0.0,
      )
  
imports: import functools
  import os
  from absl.testing import parameterized
  import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import log_prob_ratio
  from tensorflow_probability.python.distributions import logistic
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import poisson
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 12 for calling the IndependentDistributionTest obj's underlying member method code with example usage: obj._testMnistLike(static_shape) and returns: unknown