code: def testMomentsEmpirically(self, loc, scale, low, high):
      n = int(2e5)
      dist = truncated_normal.TruncatedNormal(
          loc=loc, scale=scale, low=low, high=high, validate_args=True
      )
      x = self.evaluate(dist.sample(n, seed=test_util.test_seed()))
      empirical_mean = np.mean(x)
      empirical_var = np.var(x)
      expected_mean = self.evaluate(dist.mean())
      expected_var = self.evaluate(dist.variance())
      self.assertAlmostEqual(expected_mean, empirical_mean, places=1)
      self.assertAlmostEqual(expected_var, empirical_var, places=1)
  
imports: import itertools
  import unittest
  from absl.testing import parameterized
  import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import truncated_normal
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 6 for calling the TruncatedNormalStandaloneTestCase obj's underlying member method code with example usage: obj.testMomentsEmpirically(loc, scale, low, high) without return types