code: def _milstein_1d(
      dw, dt, sqrt_dt, current_state, drift, vol, grad_vol
  ):
      """Performs the milstein update in one dimension."""
      dw = dw * sqrt_dt
      dt_inc = dt * drift  # pylint: disable=not-callable
      dw_inc = tf.linalg.matvec(vol, dw)  # pylint: disable=not-callable
      # Higher order terms. For dim 1, the product here is elementwise.
      hot_vol = tf.squeeze(tf.multiply(vol, grad_vol), -1)
      hot_dw = dw * dw - dt
      hot_inc = tf.multiply(hot_vol, hot_dw) / 2
      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 9 for calling a global function with example usage: _milstein_1d(dw, dt, sqrt_dt, current_state, drift, vol, grad_vol) and returns: unknown