code: def test_nested_partial_value(self, sample_fn):
      innermost = jdn.JointDistributionNamed(
          {
              "a": exponential.Exponential(1.0),
              "b": lambda a: sample_lib.Sample(
                  lognormal.LogNormal(a, a), [5]
              ),
          }
      )
  
      inner = jdn.JointDistributionNamed(
          {
              "c": exponential.Exponential(1.0),
              "d": innermost,
          }
      )
  
      outer = jdn.JointDistributionNamed(
          {
              "e": exponential.Exponential(1.0),
              "f": inner,
          }
      )
  
      seed = test_util.test_seed(sampler_type="stateless")
      true_xs = outer.sample(seed=seed)
  
      def _update(dict_, **kwargs):
          dict_.copy().update(**kwargs)
          return dict_
  
      # These asserts work because we advance the stateless seed inside the model
      # whether or not a sample is actually generated.
      partial_xs = _update(true_xs, f=None)
      xs = sample_fn(outer, value=partial_xs, seed=seed)
      self.assertAllCloseNested(true_xs, xs)
  
      partial_xs = _update(true_xs, e=None)
      xs = sample_fn(outer, value=partial_xs, seed=seed)
      self.assertAllCloseNested(true_xs, xs)
  
      partial_xs = _update(true_xs, f=_update(true_xs["f"], d=None))
      xs = sample_fn(outer, value=partial_xs, seed=seed)
      self.assertAllCloseNested(true_xs, xs)
  
      partial_xs = _update(
          true_xs,
          f=_update(true_xs["f"], d=_update(true_xs["f"]["d"], a=None)),
      )
      xs = sample_fn(outer, value=partial_xs, seed=seed)
      self.assertAllCloseNested(true_xs, xs)
  
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 5 for calling the JointDistributionNamedTest obj's underlying member method code with example usage: obj.test_nested_partial_value(sample_fn) and returns: dict_