code: def _update_params_on_kvstore_nccl(
      param_arrays, grad_arrays, kvstore, param_names
  ):
      """Perform update of param_arrays from grad_arrays on NCCL kvstore."""
      valid_indices = [
          index
          for index, grad_list in enumerate(grad_arrays)
          if grad_list[0] is not None
      ]
      valid_grad_arrays = [grad_arrays[i] for i in valid_indices]
      valid_param_arrays = [param_arrays[i] for i in valid_indices]
      valid_param_names = [param_names[i] for i in valid_indices]
      size = len(valid_grad_arrays)
      start = 0
      # Use aggregation by default only with NCCL
      default_batch = "16"
      batch = int(
          os.getenv("MXNET_UPDATE_AGGREGATION_SIZE", default_batch)
      )
      while start < size:
          end = start + batch if start + batch < size else size
          # push gradient, priority is negative index
          # pull back the weights
          kvstore.pushpull(
              valid_param_names[start:end],
              valid_grad_arrays[start:end],
              out=valid_param_arrays[start:end],
              priority=-start,
          )
          start = end
  
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 4 for calling a global function with example usage: _update_params_on_kvstore_nccl(param_arrays, grad_arrays, kvstore, param_names) without return types