code: def testNormalInverseGaussianSampleVariance(self):
      loc_v = self.dtype(-2.0)
      scale_v = self.dtype(np.pi)
      tailweight_v = self.dtype(1.87)
      skewness_v = self.dtype(-1.0)
      n = int(3e5)
      normal_inverse_gaussian = nig.NormalInverseGaussian(
          loc_v, scale_v, tailweight_v, skewness_v, validate_args=True
      )
      samples = normal_inverse_gaussian.sample(
          n, seed=test_util.test_seed()
      )
      sample_values = self.evaluate(samples)
  
      self.assertEqual(sample_values.shape, (n,))
      self.assertAllClose(
          sample_values.var(),
          self.evaluate(normal_inverse_gaussian.variance()),
          rtol=0.02,
          atol=0,
      )
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import normal_inverse_gaussian
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 9 for calling the _NormalInverseGaussianTest obj's underlying member method code with example usage: obj.testNormalInverseGaussianSampleVariance() without return types