code: def test_lattice_rule_sample(self):
      expected = tf.constant(
          [
              [0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000],
              [0.0625, 0.6875, 0.0625, 0.8125, 0.4375, 0.5625],
              [0.1250, 0.3750, 0.1250, 0.6250, 0.8750, 0.1250],
              [0.1875, 0.0625, 0.1875, 0.4375, 0.3125, 0.6875],
              [0.2500, 0.7500, 0.2500, 0.2500, 0.7500, 0.2500],
              [0.3125, 0.4375, 0.3125, 0.0625, 0.1875, 0.8125],
              [0.3750, 0.1250, 0.3750, 0.8750, 0.6250, 0.3750],
              [0.4375, 0.8125, 0.4375, 0.6875, 0.0625, 0.9375],
              [0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000],
              [0.5625, 0.1875, 0.5625, 0.3125, 0.9375, 0.0625],
              [0.6250, 0.8750, 0.6250, 0.1250, 0.3750, 0.6250],
              [0.6875, 0.5625, 0.6875, 0.9375, 0.8125, 0.1875],
              [0.7500, 0.2500, 0.7500, 0.7500, 0.2500, 0.7500],
              [0.8125, 0.9375, 0.8125, 0.5625, 0.6875, 0.3125],
              [0.8750, 0.6250, 0.8750, 0.3750, 0.1250, 0.8750],
              [0.9375, 0.3125, 0.9375, 0.1875, 0.5625, 0.4375],
          ],
          dtype=tf.float32,
      )
  
      for dtype in [tf.int32, tf.int64]:
          actual = qmc.lattice_rule_sample(
              self.generating_vectors(dtype=dtype),
              6,
              16,
              validate_args=True,
          )
  
          with self.subTest("Values"):
              self.assertAllClose(
                  self.evaluate(actual),
                  self.evaluate(expected),
                  rtol=1e-6,
              )
          with self.subTest("DType"):
              self.assertEqual(actual.dtype, expected.dtype)
  
file_path: tf-quant-finance/tf_quant_finance/math/qmc/lattice_rule_test.py
imports: import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 4 for calling the LatticeRuleTest obj's underlying member method code with example usage: obj.test_lattice_rule_sample() without return types