code: def adam_update_numpy(
      param,
      g_t,
      t,
      m,
      v,
      alpha=0.001,
      beta1=0.9,
      beta2=0.999,
      epsilon=1e-8,
  ):
      alpha_t = alpha * np.sqrt(1 - beta2**t) / (1 - beta1**t)
  
      m_t = beta1 * m + (1 - beta1) * g_t
      v_t = beta2 * v + (1 - beta2) * g_t * g_t
  
      param_t = param - alpha_t * m_t / (np.sqrt(v_t) + epsilon)
      return param_t, m_t, v_t
  
imports: import numpy
  from tensorflow.python.client import session
  from tensorflow.python.compiler.xla.experimental import xla_sharding
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import ref_variable
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.training import adam
label_desc: Use image node_id 1 for calling a global function with example usage: adam_update_numpy(param, g_t, t, m, v, alpha, beta1, beta2, epsilon) and returns: param_t,  m_t,  v_t