class_docstr: Well tested because this is a simple override of the base class.
code: def testSample(self):
      mu = [-0.5, 0.5]
      diag = [0.7, -1.2]
      dist = mvn_diag.MultivariateNormalDiag(
          mu, diag, validate_args=True
      )
      samps = self.evaluate(
          dist.sample(int(5e3), seed=test_util.test_seed())
      )
      cov_mat = self.evaluate(tf.linalg.diag(diag)) ** 2
  
      self.assertAllClose(mu, samps.mean(axis=0), atol=0.0, rtol=0.1)
      self.assertAllClose(cov_mat, np.cov(samps.T), atol=0.1, rtol=0.05)
  
imports: import os
  from absl.testing import parameterized
  import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 8 for calling the MultivariateNormalDiagTest obj's underlying member method code with example usage: obj.testSample() without return types