code: def _milstein_nd(
      dim,
      num_samples,
      dw,
      dt,
      sqrt_dt,
      current_state,
      drift,
      vol,
      grad_vol,
      stratonovich_draws,
      stratonovich_order,
  ):
      """Performs the milstein update in multiple dimensions."""
      dw = dw * sqrt_dt
      drift_update = _stratonovich_drift_update(
          num_samples, vol, grad_vol
      )
      dt_inc = dt * (
          drift - drift_update
      )  # pylint: disable=not-callable
      dw_inc = tf.linalg.matvec(vol, dw)  # pylint: disable=not-callable
      hot_inc = _milstein_hot(
          dim=dim,
          vol=vol,
          grad_vol=grad_vol,
          dt=dt,
          sqrt_dt=sqrt_dt,
          dw=dw,
          stratonovich_draws=stratonovich_draws,
          stratonovich_order=stratonovich_order,
      )
      return current_state + dt_inc + dw_inc + hot_inc
  
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 10 for calling a global function with example usage: _milstein_nd(dim, num_samples, dw, dt, sqrt_dt, current_state, drift, vol, grad_vol, stratonovich_draws, stratonovich_order) and returns: unknown