code: def testMoyalSample(self):
      loc = self.dtype(4.0)
      scale = self.dtype(1.0)
      n = int(3e5)
  
      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)
      self.assertEqual((n,), sample_values.shape)
      self.assertAllClose(
          stats.moyal.mean(loc=loc, scale=scale),
          sample_values.mean(),
          rtol=0.01,
      )
      self.assertAllClose(
          stats.moyal.var(loc=loc, scale=scale),
          sample_values.var(),
          rtol=0.01,
      )
  
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 12 for calling the _MoyalTest obj's underlying member method code with example usage: obj.testMoyalSample() without return types