docstr: Tests that sampled paths have the expected dtypes.
docstr_tok: ["Tests","that","sampled","paths","have","the","expected","dtypes","."]
code: def test_sample_paths_dtypes(self):
      """Tests that sampled paths have the expected dtypes."""
      r = 0.5
      sigma = 0.5
  
      def drift_fn(t, x):
          del t
          return r * x
  
      def vol_fn(t, x):
          del t
          return sigma * tf.expand_dims(x, -1)
  
      for dtype in [np.float32, np.float64]:
          paths = self.evaluate(
              milstein_sampling.sample(
                  dim=1,
                  drift_fn=drift_fn,
                  volatility_fn=vol_fn,
                  times=[0.1, 0.2],
                  num_samples=10,
                  initial_state=[0.1],
                  time_step=0.01,
                  seed=123,
                  dtype=dtype,
              )
          )
  
          self.assertEqual(paths.dtype, dtype)
  
file_path: tf-quant-finance/tf_quant_finance/models/milstein_sampling_test.py
imports: import functools
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
  from tf_quant_finance.math import gradient
label_desc: Use image node_id 5 for calling the MilsteinSamplingTest obj's underlying member method code with example usage: obj.test_sample_paths_dtypes() and returns: unknown, unknown