code: def testVonMisesSampleCircularVarianceGradient(self):
      loc = self.make_tensor([1.0] * 7)
      concentration = self.make_tensor(np.logspace(-3, 3, 7))
      n = 1000
  
      def loss(loc, concentration):
          dist = von_mises.VonMises(
              loc, concentration, validate_args=True
          )
          samples = dist.sample(n, seed=test_util.test_seed())
          return tf.reduce_mean(1.0 - tf.cos(samples - loc), axis=0)
  
      _, [grad_loc, grad_concentration] = self.evaluate(
          gradient.value_and_gradient(loss, [loc, concentration])
      )
  
      def analytical_loss(concentration):
          return 1.0 - tf.math.bessel_i1e(
              concentration
          ) / tf.math.bessel_i0e(concentration)
  
      (
          _,
          expected_grad_concentration,
      ) = self.evaluate(
          gradient.value_and_gradient(analytical_loss, concentration)
      )
  
      self.assertAllClose(grad_loc, [0.0] * 7, atol=1e-2, rtol=1e-2)
      self.assertAllClose(
          grad_concentration,
          expected_grad_concentration,
          atol=1e-1,
          rtol=1e-1,
      )
  
imports: import numpy
  from scipy import special
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import von_mises
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 24 for calling the _VonMisesTest obj's underlying member method code with example usage: obj.testVonMisesSampleCircularVarianceGradient() and returns: tf, unknown