code: def test_batch_slicing(self):
      # pylint: disable=bad-whitespace
      d = jdn.JointDistributionNamed(
          dict(
              s=exponential.Exponential(rate=[10, 12, 14]),
              n=lambda s: normal.Normal(loc=0, scale=s),
              x=lambda: beta.Beta(
                  concentration0=[3, 2, 1], concentration1=1
              ),
          ),
          validate_args=True,
      )
      # pylint: enable=bad-whitespace
  
      d0, d1 = d[:1], d[1:]
      x0 = d0.sample(seed=test_util.test_seed())
      x1 = d1.sample(seed=test_util.test_seed())
  
      self.assertLen(x0, 3)
      self.assertEqual([1], x0["s"].shape)
      self.assertEqual([1], x0["n"].shape)
      self.assertEqual([1], x0["x"].shape)
  
      self.assertLen(x1, 3)
      self.assertEqual([2], x1["s"].shape)
      self.assertEqual([2], x1["n"].shape)
      self.assertEqual([2], x1["x"].shape)
  
imports: import collections
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import beta
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import half_normal
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import joint_distribution_named
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  from tensorflow_probability.python.distributions import kullback_leibler
  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 sample
  from tensorflow_probability.python.distributions import student_t
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 18 for calling the JointDistributionNamedTest obj's underlying member method code with example usage: obj.test_batch_slicing() without return types