code: def generate_sample_paths(
      mu, sigma, times, initial_state, supply_draws, num_samples, dtype
  ):
      """Returns the sample paths for the process with the given parameters.
  
      Args:
        mu: Scalar real `Tensor` broadcastable to [`batch_shape`, 1] or an instance
          of left-continuous `PiecewiseConstantFunc` of [`batch_shape`]
          dimensions. Where `batch_shape` is the larger of `mu.shape` and
          `sigma.shape`. Corresponds to the mean drift of the Ito process.
        sigma: Scalar real `Tensor` broadcastable to [`batch_shape`, 1] or an
          instance of left-continuous `PiecewiseConstantFunc` of the same `dtype`
          and `batch_shape` as set by `mu`. Where `batch_shape` is the larger of
          `mu.shape` and `sigma.shape`. Corresponds to the volatility of the
          process and should be positive.
        times: A `Tensor` of positive real values of a shape [`T`, `num_times`],
          where `T` is either empty or a shape which is broadcastable to
          `batch_shape` (as defined by the shape of `mu` or `sigma`. The times at
          which the path points are to be evaluated.
        initial_state: A `Tensor` of the same `dtype` as `times` and of shape
          broadcastable to `[batch_shape, num_samples]`. Represents the initial
          state of the Ito process.
        supply_draws: Boolean set to true if the `normal_draws` should be generated
          and then passed to the pricing function.
        num_samples: Positive scalar `int`. The number of paths to draw.
        dtype: The default dtype to use when converting values to `Tensor`s.
  
      Returns:
        A Tensor containing the the sample paths of shape
        [batch_shape, num_samples, num_times, 1].
      """
      process = tff.models.GeometricBrownianMotion(
          mu, sigma, dtype=dtype
      )
      normal_draws = None
      if supply_draws:
          total_dimension = tf.zeros(times.shape[-1], dtype=dtype)
          # Shape [num_samples, times.shape[-1]]
          normal_draws = tff.math.random.mv_normal_sample(
              [num_samples],
              mean=total_dimension,
              random_type=tff.math.random.RandomType.SOBOL,
              seed=[4, 2],
          )
          # Shape [num_samples, times.shape[-1], 1]
          normal_draws = tf.expand_dims(normal_draws, axis=-1)
      return process.sample_paths(
          times=times,
          initial_state=initial_state,
          random_type=tff.math.random.RandomType.STATELESS,
          num_samples=num_samples,
          normal_draws=normal_draws,
          seed=[1234, 5],
      )
  
file_path: tf-quant-finance/tf_quant_finance/models/geometric_brownian_motion/geometric_brownian_motion_test_utils.py
imports: import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
label_desc: Use image node_id 3 for calling a global function with example usage: generate_sample_paths(mu, sigma, times, initial_state, supply_draws, num_samples, dtype) and returns: process