code: def test_batch_ndims_nested_input(self):
      dist = jdu.independent_joint_distribution_from_structure(
          [
              normal.Normal(0.0, tf.ones([5, 4])),
              {
                  "b": poisson.Poisson(tf.ones([5])),
                  "c": dirichlet.Dirichlet(tf.ones([5, 3])),
              },
          ],
          batch_ndims=1,
      )
      self.assertAllEqualNested(
          dist.event_shape, [[4], {"b": [], "c": [3]}]
      )
      self.assertAllEqual(dist.batch_shape, [5])
  
imports: import collections
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import dirichlet
  from tensorflow_probability.python.distributions import joint_distribution_named
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  from tensorflow_probability.python.distributions import joint_distribution_util
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import poisson
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 9 for calling the JointDistributionUtilTest obj's underlying member method code with example usage: obj.test_batch_ndims_nested_input() without return types