class_docstr: FATECommunicator is a wrapper around the FATE communicator.
class_docstr_tok: ["FATECommunicator","is","a","wrapper","around","the","FATE","communicator","."]
docstr: Returns communication statistics in a Python dict.
  
  NOTE: Each party performs its own logging of communication, so one needs
  to sum the number of bytes communicated over all parties and divide by
  two (to prevent double-counting) to obtain the number of bytes
  communicated in the overall system.
code: def get_communication_stats(self):
      """
      Returns communication statistics in a Python dict.
  
      NOTE: Each party performs its own logging of communication, so one needs
      to sum the number of bytes communicated over all parties and divide by
      two (to prevent double-counting) to obtain the number of bytes
      communicated in the overall system.
      """
      return {
          "rounds": self.comm_rounds,
          "bytes": self.comm_bytes,
          "time": self.comm_time,
      }
  
imports: import functools
  import logging
  import sys
  import timeit
  from concurrent.futures import ThreadPoolExecutor
  import torch
  from torch.distributed import ReduceOp
  from torch.distributed import ReduceOp
  from fate.arch.context import Context, NS, Parties
  from fate.arch import trace
  from typing import List
label_desc: Use image node_id 26 for calling the Communicator obj's underlying member method code with example usage: obj.get_communication_stats() and returns: dict