docstr: Verifies a failure scenario identified by hypothesis testing.
  
  Calling self.copy(distribution=sliced_underlying) without explicitly
  specifying reinterpreted_batch_ndims allowed the default fallback logic of
  rank(underlying.batch_shape)-1 to take over, which we don't want in the
  slice case.
docstr_tok: ["Verifies","a","failure","scenario","identified","by","hypothesis","testing",".","Calling","self.copy","(","distribution=sliced_underlying",")","without","explicitly","specifying","reinterpreted_batch_ndims","allowed","the","default","fallback","logic","of","rank","(","underlying.batch_shape",")","-1","to","take","over",",","which","we","do","n't","want","in","the","slice","case","."]
code: def testSlicingScalarDistZeroReinterpretedDims(self):
      """Verifies a failure scenario identified by hypothesis testing.
  
      Calling self.copy(distribution=sliced_underlying) without explicitly
      specifying reinterpreted_batch_ndims allowed the default fallback logic of
      rank(underlying.batch_shape)-1 to take over, which we don't want in the
      slice case.
      """
      d = independent.Independent(
          bernoulli.Bernoulli(logits=0), validate_args=True
      )
      self.assertAllEqual([], d[...].batch_shape)
      self.assertAllEqual([], d[...].event_shape)
      self.assertAllEqual([1], d[tf.newaxis].batch_shape)
      self.assertAllEqual([], d[tf.newaxis].event_shape)
      self.assertAllEqual([1], d[..., tf.newaxis].batch_shape)
      self.assertAllEqual([], d[..., tf.newaxis].event_shape)
      self.assertAllEqual(
          [1, 1], d[tf.newaxis, ..., tf.newaxis].batch_shape
      )
      self.assertAllEqual(
          [], d[tf.newaxis, ..., tf.newaxis].event_shape
      )
  
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 15 for calling the IndependentDistributionTest obj's underlying member method code with example usage: obj.testSlicingScalarDistZeroReinterpretedDims() without return types