code: def test_can_call_log_prob_with_kwargs(self):
      d = jdn.JointDistributionNamed(
          {
              "e": normal.Normal(0.0, 1.0),
              "a": independent.Independent(
                  exponential.Exponential(rate=[100, 120]),
                  reinterpreted_batch_ndims=1,
              ),
              "x": lambda a: gamma.Gamma(
                  concentration=a[..., 0], rate=a[..., 1]
              ),
          },
          validate_args=True,
      )
  
      sample = self.evaluate(
          d.sample([2, 3], seed=test_util.test_seed())
      )
      e, a, x = sample["e"], sample["a"], sample["x"]
  
      lp_value_positional = self.evaluate(
          d.log_prob({"e": e, "a": a, "x": x})
      )
      lp_value_named = self.evaluate(
          d.log_prob(value={"e": e, "a": a, "x": x})
      )
      # Assert all close (rather than equal) because order is not defined for
      # dicts, and reordering the computation can give subtly different results.
      self.assertAllClose(lp_value_positional, lp_value_named)
  
      lp_kwargs = self.evaluate(d.log_prob(a=a, e=e, x=x))
      self.assertAllClose(lp_value_positional, lp_kwargs)
  
      with self.assertRaisesRegexp(
          ValueError,
          "Joint distribution with unordered variables "
          "can't take positional args",
      ):
          lp_kwargs = d.log_prob(e, a, x)
  
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 4 for calling the JointDistributionNamedTest obj's underlying member method code with example usage: obj.test_can_call_log_prob_with_kwargs() without return types