docstr: Adds the gradient to param_loc bucket stored in
  the gradient_dict.
  Args:
      gradient (torch.Tensor): tensor sent from trainer
      param_loc (int): bucket location sent by the trainer
          containing the gradient
docstr_tok: ["Adds","the","gradient","to","param_loc","bucket","stored","in","the","gradient_dict",".","Args",":","gradient","(","torch.Tensor",")",":","tensor","sent","from","trainer","param_loc","(","int",")",":","bucket","location","sent","by","the","trainer","containing","the","gradient"]
code: def process_gradient(self, gradient, param_loc):
      r"""
      Adds the gradient to param_loc bucket stored in
      the gradient_dict.
      Args:
          gradient (torch.Tensor): tensor sent from trainer
          param_loc (int): bucket location sent by the trainer
              containing the gradient
      """
      if param_loc not in self.gradient_dict:
          self.record_straggler_start(self.param_key(param_loc))
          self.record_batch_start(self.param_key(param_loc))
          self.gradient_dict[param_loc] = []
      self.gradient_dict[param_loc].append(gradient)
  
imports: import functools
  import threading
  import time
  from abc import ABC, abstractmethod
  import torch
  import torch.distributed.rpc
  from metrics.MetricsLogger import MetricsLogger
  from utils import sparse_rpc_format_to_tensor, sparse_tensor_to_rpc_format
label_desc: Use image node_id 2 for calling the AverageBatchParameterServer obj's underlying member method code with example usage: obj.process_gradient(gradient, param_loc) without return types