code: def testSecondGradientIsDisabled(self):
      if not self.use_static_shape:
          return
  
      def sample(logits):
          mixture = mixture_same_family.MixtureSameFamily(
              mixture_distribution=categorical.Categorical(
                  logits=logits
              ),
              components_distribution=normal.Normal(
                  loc=self._build_tensor([[0.4, 0.25]]),
                  scale=self._build_tensor([[0.1, 0.5]]),
              ),
              reparameterize=True,
              validate_args=True,
          )
  
          return mixture.sample(seed=test_util.test_seed())
  
      logits = self._build_tensor([[0.1, 0.5]])
  
      with self.assertRaises(LookupError):
          _, grad = gradient.value_and_gradient(
              lambda x: gradient.value_and_gradient(sample, x)[1],
              logits,
          )
          self.evaluate(grad)
  
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 16 for calling the _MixtureSameFamilyTest obj's underlying member method code with example usage: obj.testSecondGradientIsDisabled() and returns: mixture