docstr: A method that clears the state of the server.
  Args:
      server_rref (RRef): remote reference to the server
docstr_tok: ["A","method","that","clears","the","state","of","the","server",".","Args",":","server_rref","(","RRef",")",":","remote","reference","to","the","server"]
code: def reset_state(server_rref):
      r"""
      A method that clears the state of the server.
      Args:
          server_rref (RRef): remote reference to the server
      """
      self = server_rref.local_value()
      self.batch_number = 0
      self.futures.clear()
      self.gradient_dict.clear()
      self.clear_metrics()
  
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 AverageParameterServer obj's underlying member method code with example usage: obj.reset_state(server_rref) without return types