code: def test_bijector_event_ndims(self):
      bij = sigmoid.Sigmoid(low=tf.zeros([2]), high=tf.ones([3, 2]))
      self.assertAllEqual(
          batch_shape_lib.inferred_batch_shape(bij), [3, 2]
      )
      self.assertAllEqual(
          batch_shape_lib.inferred_batch_shape_tensor(bij), [3, 2]
      )
      self.assertAllEqual(
          batch_shape_lib.inferred_batch_shape(
              bij, bijector_x_event_ndims=1
          ),
          [3],
      )
      self.assertAllEqual(
          batch_shape_lib.inferred_batch_shape_tensor(
              bij, bijector_x_event_ndims=1
          ),
          [3],
      )
  
      # Verify that we don't pass Nones through to component
      # `experimental_batch_shape(x_event_ndims=None)` calls, where they'd be
      # incorrectly interpreted as `x_event_ndims=forward_min_event_ndims`.
      joint_bij = joint_map.JointMap([bij, bij])
      self.assertAllEqual(
          batch_shape_lib.inferred_batch_shape(
              joint_bij, bijector_x_event_ndims=[None, None]
          ),
          tf.TensorShape(None),
      )
  
imports: from absl import logging
  from absl.testing import parameterized
  import mock
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import joint_map
  from tensorflow_probability.python.bijectors import sigmoid
  from tensorflow_probability.python.distributions import categorical
  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 mvn_tril
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import batch_shape_lib
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import test_util
  from tensorflow.python.util import nest
label_desc: Use image node_id 2 for calling the BatchShapeInferenceTests obj's underlying member method code with example usage: obj.test_bijector_event_ndims() without return types