code: def testLaplacePdfOfSampleMultiDims(self):
      dist = laplace.Laplace(
          loc=[7.0, 11.0], scale=[[5.0], [6.0]], validate_args=True
      )
      num = 50000
      samples = dist.sample(num, seed=test_util.test_seed())
      pdfs = dist.prob(samples)
      sample_vals, pdf_vals = self.evaluate([samples, pdfs])
      self.assertEqual(samples.shape, (num, 2, 2))
      self.assertEqual(pdfs.shape, (num, 2, 2))
      self._assertIntegral(
          sample_vals[:, 0, 0], pdf_vals[:, 0, 0], err=0.02
      )
      self._assertIntegral(
          sample_vals[:, 0, 1], pdf_vals[:, 0, 1], err=0.02
      )
      self._assertIntegral(
          sample_vals[:, 1, 0], pdf_vals[:, 1, 0], err=0.02
      )
      self._assertIntegral(
          sample_vals[:, 1, 1], pdf_vals[:, 1, 1], err=0.02
      )
      self.assertAllClose(
          sp_stats.laplace.mean(
              [[7.0, 11.0], [7.0, 11.0]],
              scale=np.array([[5.0, 5.0], [6.0, 6.0]]),
          ),
          sample_vals.mean(axis=0),
          rtol=0.05,
          atol=0.0,
      )
      self.assertAllClose(
          sp_stats.laplace.var(
              [[7.0, 11.0], [7.0, 11.0]],
              scale=np.array([[5.0, 5.0], [6.0, 6.0]]),
          ),
          sample_vals.var(axis=0),
          rtol=0.05,
          atol=0.0,
      )
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import laplace
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 18 for calling the LaplaceTest obj's underlying member method code with example usage: obj.testLaplacePdfOfSampleMultiDims() without return types