code: def test_sample_dtype_structures_output(self):
      num_features = 4
  
      def dist():
          scale_variance = yield Root(
              inverse_gamma.InverseGamma(0.5, 0.5)
          )
          scale_noncentered = yield Root(
              sample_lib.Sample(
                  half_normal.HalfNormal(1.0), num_features
              )
          )
          scale = scale_noncentered * scale_variance[..., None] ** 0.5
          weights_noncentered = yield Root(
              sample_lib.Sample(normal.Normal(0.0, 1.0), num_features)
          )
          yield deterministic.Deterministic(weights_noncentered * scale)
  
      # Currently sample_dtype is only used for `tf.nest.pack_structure_as`. In
      # the future we may use it for error checking and/or casting.
      sample_dtype = collections.namedtuple(
          "Model",
          [
              "scale_variance",
              "scale_noncentered",
              "weights_noncentered",
              "weights",
          ],
      )(*([None] * 4))
      joint = jdab.JointDistributionCoroutineAutoBatched(
          dist, sample_dtype=sample_dtype, validate_args=True
      )
      self.assertAllEqual(
          sorted(sample_dtype._fields),
          sorted(joint.sample(seed=test_util.test_seed())._fields),
      )
      ds, xs = joint.sample_distributions(seed=test_util.test_seed())
      tf.nest.assert_same_structure(sample_dtype, ds)
      tf.nest.assert_same_structure(sample_dtype, xs)
      self.assertEqual(
          [3, 4],
          joint.log_prob(
              joint.sample([3, 4], seed=test_util.test_seed())
          ).shape,
      )
  
imports: import collections
  import os
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import deterministic
  from tensorflow_probability.python.distributions import dirichlet
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import half_normal
  from tensorflow_probability.python.distributions import inverse_gamma
  from tensorflow_probability.python.distributions import joint_distribution_auto_batched
  from tensorflow_probability.python.distributions import joint_distribution_coroutine
  from tensorflow_probability.python.distributions import joint_distribution_named
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import multinomial
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import poisson
  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.distributions import uniform
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.util import deferred_tensor
label_desc: Use image node_id 16 for calling the JointDistributionAutoBatchedTest obj's underlying member method code with example usage: obj.test_sample_dtype_structures_output() without return types