code: def testMoyalSampleMultidimensionalVar(self):
      batch_size = 6
      loc = np.array([[2.0, 4.0, 5.0]] * batch_size, dtype=self.dtype)
      scale = np.array([1.0, 0.8, 0.5], dtype=self.dtype)
      n = int(1e5)
  
      dist = moyal.Moyal(
          loc=self.make_tensor(loc),
          scale=self.make_tensor(scale),
          validate_args=True,
      )
  
      samples = dist.sample(n, seed=test_util.test_seed())
      sample_values = self.evaluate(samples)
      # TODO(b/157561663): Remove the masking once tf.math.special.erfcinv exists.
      sample_values = np.ma.masked_invalid(sample_values)
      self.assertAllClose(
          stats.moyal.var(loc=loc, scale=scale),
          sample_values.var(axis=0),
          rtol=0.03,
          atol=0,
      )
  
imports: import numpy
  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 moyal
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 14 for calling the _MoyalTest obj's underlying member method code with example usage: obj.testMoyalSampleMultidimensionalVar() without return types