code: def make_jd_named(axis_name):
      return jd.JointDistributionNamed(  # pylint: disable=g-long-lambda
          dict(
              w=normal.Normal(0.0, 1.0),
              x=lambda w: sharded.Sharded(  # pylint: disable=g-long-lambda
                  sample_dist_lib.Sample(normal.Normal(w, 1.0), 1),
                  shard_axis_name=axis_name,
              ),
              data=lambda x: sharded.Sharded(  # pylint: disable=g-long-lambda
                  independent.Independent(normal.Normal(x, 1.0), 1),
                  shard_axis_name=axis_name,
              ),
          )
      )
  
imports: from absl.testing import parameterized
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import joint_distribution_coroutine
  from tensorflow_probability.python.distributions import log_prob_ratio
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.distributions import uniform
  from tensorflow_probability.python.experimental.distribute import joint_distribution
  from tensorflow_probability.python.experimental.distribute import sharded
  from tensorflow_probability.python.internal import distribute_test_lib
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 3 for calling a global function with example usage: make_jd_named(axis_name) and returns: jd