code: def update(self, lr):
      for param in self.params:
          # TODO(beam2d): make it easier
          p = param.as_grad_stopped()
          # TODO(beam2d): make grad not have graph by default
          p -= lr * param.grad.as_grad_stopped()
          param.cleargrad()
  
file_path: chainer/chainerx_cc/examples/mnist_py/train_mnist.py
imports: import argparse
  import gzip
  import pathlib
  import time
  import numpy
  import chainerx
label_desc: Use image node_id 4 for calling the MLP obj's underlying member method code with example usage: obj.update(lr) without return types