code: def adam(
      self,
      weights,
      gradient,
      mom1,
      mom2,
      beta1,
      beta2,
      eps,
      learn_rate,
      mod_rate=1.0,
  ):
      _check_compatible_shape(weights, gradient)
      _check_compatible_shape(weights, mom1)
      _check_compatible_shape(weights, mom2)
  
      adam_kernel(
          gradient,
          learn_rate,
          1 - beta1,
          1 - beta2,
          eps,
          weights,
          mom1,
          mom2,
      )
      gradient.fill(0)
      return weights, gradient, mom1, mom2
  
imports: import numpy
  from ..None import registry
  from ..compat import cupy, cupyx
  from ..types import DeviceTypes
  from ..util import is_cupy_array, is_mxnet_gpu_array, is_tensorflow_gpu_array, is_torch_cuda_array, mxnet2xp, tensorflow2xp, torch2xp
  from .None import _custom_kernels
  from .numpy_ops import NumpyOps
  from .ops import Ops
label_desc: Use image node_id 34 for calling the CupyOps obj's underlying member method code with example usage: obj.adam(weights, gradient, mom1, mom2, beta1, beta2, eps, learn_rate, mod_rate) and returns: weights,  gradient,  mom1,  mom2