code: def test_everything_nonscalar(self):
      s = sample.Sample(
          independent.Independent(
              normal.Normal(loc=tf.zeros([3, 2]), scale=1), 1
          ),
          [5, 4],
          validate_args=True,
      )
      x = s.sample([6, 1], seed=test_util.test_seed())
      actual_lp = s.log_prob(x)
      # Sample.log_prob will reduce over event space, ie, dims [2, 3, 5]
      # corresponding to sizes concat([[5, 4], [2]]).
      expected_lp = tf.reduce_sum(
          s.distribution.log_prob(
              tf.transpose(a=x, perm=[0, 1, 3, 4, 2, 5])
          ),
          axis=[2, 3],
      )
      x_, actual_lp_, expected_lp_ = self.evaluate(
          [x, actual_lp, expected_lp]
      )
      self.assertEqual((6, 1, 3, 5, 4, 2), x_.shape)
      self.assertEqual((6, 1, 3), actual_lp_.shape)
      self.assertAllClose(expected_lp_, actual_lp_, atol=0, rtol=1e-3)
  
imports: import functools
  import os
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import scale_matvec_tril
  from tensorflow_probability.python.distributions import cholesky_lkj
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import log_prob_ratio
  from tensorflow_probability.python.distributions import logistic
  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 poisson
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.distributions import uniform
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 2 for calling the SampleDistributionTest obj's underlying member method code with example usage: obj.test_everything_nonscalar() without return types