code: def size_num_grads(link):
      """Count total size of all gradient arrays of a given link
  
      Args:
          link (chainer.link.Link): Target link object.
      """
      size = 0
      num = 0
      for param in link.params():
          if param.size == 0:
              continue
          size += param.size
          num += 1
      return size, num
  
imports: import multiprocessing
  import warnings
  import numpy
  import six
  import chainer
  from chainer.backends import cuda
  from chainer.dataset import convert
  from chainer import reporter
  from chainer.training.updaters import standard_updater
label_desc: Use image node_id 2 for calling a global function with example usage: size_num_grads(link) and returns: size,  num