code: def eight_schools_named():
      model = jdn.JointDistributionNamed(
          dict(
              avg_effect=normal.Normal(0.0, 5.0, name="avg_effect"),
              avg_stddev=half_normal.HalfNormal(5.0, name="avg_stddev"),
              school_effects_std=sample.Sample(
                  normal.Normal(0.0, 1.0),
                  NUM_SCHOOLS,
                  name="school_effects_std",
              ),
              # pylint: disable=g-long-lambda
              treatment_effects=lambda school_effects_std, avg_stddev, avg_effect: independent.Independent(
                  normal.Normal(
                      loc=(
                          avg_effect[..., tf.newaxis]
                          + avg_stddev[..., tf.newaxis]
                          * school_effects_std
                      ),
                      scale=tf.constant(TREATMENT_STDDEVS),
                  ),
                  reinterpreted_batch_ndims=1,
                  name="treatment_effects",
              ),
          )
      )
      # pylint: enable=g-long-lambda
      return model
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import pad
  from tensorflow_probability.python.distributions import autoregressive
  from tensorflow_probability.python.distributions import beta_binomial
  from tensorflow_probability.python.distributions import dirichlet
  from tensorflow_probability.python.distributions import half_normal
  from tensorflow_probability.python.distributions import independent
  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 multinomial
  from tensorflow_probability.python.distributions import mvn_diag
  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 uniform
  from tensorflow_probability.python.experimental import distribute
  from tensorflow_probability.python.experimental.mcmc import windowed_sampling
  from tensorflow_probability.python.internal import callable_util
  from tensorflow_probability.python.internal import distribute_test_lib
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import unnest
  from tensorflow_probability.python.mcmc import diagnostic
label_desc: Use image node_id 3 for calling a global function with example usage: eight_schools_named() and returns: model