code: def _update_params(
      param_arrays,
      grad_arrays,
      updater,
      num_device,
      kvstore=None,
      param_names=None,
  ):
      """Perform update of param_arrays from grad_arrays not on kvstore."""
      updates = [[] for _ in range(num_device)]
      for i, pair in enumerate(zip(param_arrays, grad_arrays)):
          arg_list, grad_list = pair
          if grad_list[0] is None:
              continue
          index = i
          if kvstore:
              name = param_names[index]
              # push gradient, priority is negative index
              if (
                  grad_list[0].stype == "default"
                  and arg_list[0].stype == "default"
              ):
                  kvstore.pushpull(name, grad_list, priority=-index)
              else:
                  kvstore.push(name, grad_list, priority=-index)
                  kvstore.pull(name, out=grad_list, priority=-index)
          for k, p in enumerate(zip(arg_list, grad_list)):
              # faked an index here, to make optimizer create diff
              # state for the same index but on diff devs, TODO(mli)
              # use a better solution later
              w, g = p
              updates[k].append((index * num_device + k, g, w))
      for dev_updates in updates:
          # update params if param_arrays and grad_arrays are not empty
          if dev_updates:
              i, w, g = zip(*dev_updates)
              updater(i, w, g)
  
file_path: mxnet/python/mxnet/model.py
imports: import os
  import logging
  from collections import namedtuple
  import numpy
  from .None import ndarray
  from .None import symbol
  from .None import kvstore
  from .device import cpu
label_desc: Use image node_id 6 for calling a global function with example usage: _update_params(param_arrays, grad_arrays, updater, num_device, kvstore, param_names) without return types