code: def _test_batch_shapes(self, dist, tensor):
      self.assertAllEqual(dist.batch_shape, tensor.shape)
      self.assertAllEqual(
          self.evaluate(dist.batch_shape_tensor()),
          self.evaluate(tensor).shape,
      )
  
imports: import numpy
  import scipy.stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import horseshoe
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 3 for calling the _HorseshoeTest obj's underlying member method code with example usage: obj._test_batch_shapes(dist, tensor) without return types