code: def _stratonovich_drift_update(num_samples, vol, grad_vol):
      """Updates drift function for use with stratonovich integrals."""
      # Compute 1/2 \sum_j^m L_bar^j b^{k,j}
      # See Eq 1.3 of section 10.1 in [2]
      vol = tf.reshape(vol, [num_samples, -1])
      grad_vol = tf.concat(grad_vol, 2)
      # A tensor of shape [num_samples, dim].
      return tf.linalg.matvec(grad_vol, vol)
  
imports: import functools
  import math
  from typing import Callable, List, Optional
  import numpy
  import tensorflow.compat.v2
  from tf_quant_finance import types
  from tf_quant_finance import utils
  from tf_quant_finance.math import custom_loops
  from tf_quant_finance.math import gradient
  from tf_quant_finance.math import random_ops
  from tf_quant_finance.models import utils
label_desc: Use image node_id 8 for calling a global function with example usage: _stratonovich_drift_update(num_samples, vol, grad_vol) and returns: tf