code: def testExcessiveConcretizationOfParams(self):
      logits = tfp_hps.defer_and_count_usage(
          tf.Variable(
              np.zeros((3, 5, 2)),
              dtype=tf.float32,
              shape=tf.TensorShape([None, None, 2]),
              name="logits",
          )
      )
      concentration = tfp_hps.defer_and_count_usage(
          tf.Variable(
              np.ones((3, 5, 4)),
              dtype=tf.float32,
              shape=tf.TensorShape(None),
              name="concentration",
          )
      )
      loc = tfp_hps.defer_and_count_usage(
          tf.Variable(
              np.zeros((3, 5, 4)),
              dtype=tf.float32,
              shape=tf.TensorShape(None),
              name="loc",
          )
      )
      scale = tfp_hps.defer_and_count_usage(
          tf.Variable(
              1.0,
              dtype=tf.float32,
              shape=tf.TensorShape(None),
              name="scale",
          )
      )
  
      dist = mixture.Mixture(
          categorical.Categorical(logits=logits),
          components=[
              dirichlet.Dirichlet(concentration),
              independent.Independent(
                  normal.Normal(loc=loc, scale=scale),
                  reinterpreted_batch_ndims=1,
              ),
          ],
          validate_args=True,
      )
  
      for method in (
          "batch_shape_tensor",
          "event_shape_tensor",
          "entropy_lower_bound",
      ):
          with tfp_hps.assert_no_excessive_var_usage(
              method, max_permissible=2
          ):
              getattr(dist, method)()
  
      with tfp_hps.assert_no_excessive_var_usage(
          "sample", max_permissible=4
      ):
          dist.sample(seed=test_util.test_seed())
  
      for method in ("prob", "log_prob"):
          with tfp_hps.assert_no_excessive_var_usage(
              "method", max_permissible=2
          ):
              getattr(dist, method)(tf.ones((3, 5, 4)) / 4.0)
  
      # TODO(b/140579567): The `stddev()` and `variance()` methods require
      # calling both:
      #  - `self.components[i].mean()`
      #  - `self.components[i].stddev()`
      # Thus, these methods incur an additional concretization (or two if
      # `validate_args=True` for `self.components[i]`).
  
      for method in ("stddev", "variance"):
          with tfp_hps.assert_no_excessive_var_usage(
              method, max_permissible=3
          ):
              getattr(dist, method)()
  
imports: import contextlib
  import warnings
  import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import dirichlet
  from tensorflow_probability.python.distributions import distribution
  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 mixture
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 27 for calling the MixtureTest obj's underlying member method code with example usage: obj.testExcessiveConcretizationOfParams() without return types