code: def _test_independent_joint_distribution_from_structure_helper(
      self, structure, expect_isinstance
  ):
      distribution = jdu.independent_joint_distribution_from_structure(
          structure
      )
      self.assertIsInstance(distribution, expect_isinstance)
  
      self.assertEqual(
          distribution.dtype,
          tf.nest.map_structure(lambda d: d.dtype, structure),
      )
      self.assertEqual(
          distribution.event_shape,
          tf.nest.map_structure(lambda d: d.event_shape, structure),
      )
  
      x = self.evaluate(distribution.sample(seed=test_util.test_seed()))
      joint_logprob = distribution.log_prob(x)
      indep_logprobs = sum(
          [
              d.log_prob(x_part)
              for (d, x_part) in zip(
                  tf.nest.flatten(structure), tf.nest.flatten(x)
              )
          ]
      )
      self.assertAllClose(
          *self.evaluate((joint_logprob, indep_logprobs))
      )
  
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 1 for calling the JointDistributionUtilTest obj's underlying member method code with example usage: obj._test_independent_joint_distribution_from_structure_helper(structure, expect_isinstance) without return types