code: def test_lattice_rule_sample_with_non_zero_additive_shift(self):
      generating_vectors = self.generating_vectors()
  
      additive_shift = [
          0.00,
          0.05,
          0.10,
          0.15,
          0.20,
          0.25,
          0.30,
          0.35,
          0.40,
          0.45,
          0.50,
          0.55,
          0.60,
          0.65,
          0.70,
          0.75,
          0.80,
          0.85,
          0.90,
          0.95,
      ]
  
      expected = tf.constant(
          [
              [0.000, 0.050, 0.100, 0.150, 0.200],
              [0.125, 0.425, 0.225, 0.775, 0.075],
              [0.250, 0.800, 0.350, 0.400, 0.950],
              [0.375, 0.175, 0.475, 0.025, 0.825],
              [0.500, 0.550, 0.600, 0.650, 0.700],
              [0.625, 0.925, 0.725, 0.275, 0.575],
              [0.750, 0.300, 0.850, 0.900, 0.450],
              [0.875, 0.675, 0.975, 0.525, 0.325],
          ],
          dtype=tf.float32,
      )
  
      for dtype in [tf.float32, tf.float64]:
          actual = qmc.lattice_rule_sample(
              generating_vectors,
              5,
              8,
              additive_shift=tf.constant(additive_shift, dtype=dtype),
              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 7 for calling the LatticeRuleTest obj's underlying member method code with example usage: obj.test_lattice_rule_sample_with_non_zero_additive_shift() without return types