code: def test_gradient_through_non_variable_params(self):
      df = tf.convert_to_tensor([19.43, 1.0], dtype=tf.float64)
      noncentrality = tf.convert_to_tensor(
          [5.12, 0.0], dtype=tf.float64
      )
  
      d = noncentral_chi2.NoncentralChi2(
          df=df, noncentrality=noncentrality, validate_args=True
      )
  
      with tf.GradientTape() as tape:
          tape.watch([d.df, d.noncentrality])
          loss = -d.log_prob([1.0, 2.0])
  
      grad = tape.gradient(loss, [d.df, d.noncentrality])
      grad = self.evaluate(grad)
  
      self.assertLen(grad, 2)
      self.assertAllNotNone(grad)
      self.assertAllNotNan(grad)
  
imports: from absl.testing import parameterized
  import numpy
  from scipy import stats
  import tensorflow
  from tensorflow_probability.python.distributions import noncentral_chi2
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 9 for calling the NoncentralChi2Test obj's underlying member method code with example usage: obj.test_gradient_through_non_variable_params() without return types