code: def testBatchShapes(self, test, batch_shape):
      if test == "cutpoints":
          cutpoints = self._random_cutpoints(batch_shape + [2])
          loc = tf.constant(0.0, dtype=tf.float64)
      elif test == "loc":
          cutpoints = tf.constant([1.0, 2.0], dtype=tf.float64)
          loc = self._random_location(batch_shape)
      elif test == "both":
          cutpoints = self._random_cutpoints(batch_shape + [2])
          loc = self._random_location(batch_shape)
  
      dist = ol.OrderedLogistic(cutpoints=cutpoints, loc=loc)
  
      self.assertAllEqual(dist.batch_shape, batch_shape)
      self.assertAllEqual(
          self.evaluate(dist.batch_shape_tensor()), batch_shape
      )
  
      self.assertAllEqual(dist.event_shape, [])
      self.assertAllEqual(self.evaluate(dist.event_shape_tensor()), [])
  
      categorical_probs = dist.categorical_probs()
      categorical_probs_shape = tf.shape(categorical_probs)
      self.assertAllEqual(
          self.evaluate(categorical_probs_shape), batch_shape + [3]
      )
  
      sample = dist.sample(seed=test_util.test_seed())
      sample_shape = tf.shape(sample)
      self.assertAllEqual(self.evaluate(sample_shape), batch_shape)
  
      prob_sample_shape = tf.shape(dist.prob(sample))
      survival_prob_sample_shape = tf.shape(
          dist.survival_function(sample)
      )
      self.assertAllEqual(self.evaluate(prob_sample_shape), batch_shape)
      self.assertAllEqual(
          self.evaluate(survival_prob_sample_shape), batch_shape
      )
  
      n = [4, 5]
      sample_n = dist.sample(n, seed=test_util.test_seed())
      sample_n_shape = tf.shape(sample_n)
      self.assertAllEqual(
          self.evaluate(sample_n_shape), n + batch_shape
      )
  
      prob_sample_n_shape = tf.shape(dist.prob(sample_n))
      survival_prob_sample_n_shape = tf.shape(
          dist.survival_function(sample_n)
      )
      self.assertAllEqual(
          self.evaluate(prob_sample_n_shape), n + batch_shape
      )
      self.assertAllEqual(
          self.evaluate(survival_prob_sample_n_shape), n + batch_shape
      )
  
imports: import itertools
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import ascending
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import logistic
  from tensorflow_probability.python.distributions import ordered_logistic
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 4 for calling the OrderedLogisticTest obj's underlying member method code with example usage: obj.testBatchShapes(test, batch_shape) without return types