code: def _build_mvndiag_mixture(self, probs, loc, scale_diag):
      components_distribution = mvn_diag.MultivariateNormalDiag(
          loc=self._build_tensor(loc),
          scale_diag=self._build_tensor(scale_diag),
      )
  
      # Use a no-op `Independent` wrapper to possibly create dynamic ndims.
      wrapped_components_distribution = independent.Independent(
          components_distribution,
          reinterpreted_batch_ndims=self._build_tensor(
              0, dtype=np.int32
          ),
      )
      # Lambda ensures that the covariance fn sees `self=components_distribution`.
      wrapped_components_distribution._covariance = (
          lambda: components_distribution.covariance()
      )  # pylint: disable=unnecessary-lambda
  
      gm = mixture_same_family.MixtureSameFamily(
          mixture_distribution=categorical.Categorical(
              probs=self._build_tensor(probs)
          ),
          components_distribution=wrapped_components_distribution,
          validate_args=True,
      )
      return gm
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import dirichlet
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import logistic
  from tensorflow_probability.python.distributions import mixture_same_family
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 28 for calling the _MixtureSameFamilyTest obj's underlying member method code with example usage: obj._build_mvndiag_mixture(probs, loc, scale_diag) and returns: gm