class_docstr: Abstract class defining the functions that a Communicator should implement.
class_docstr_tok: ["Abstract","class","defining","the","functions","that","a","Communicator","should","implement","."]
docstr: Prints communication statistics.
  
  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.
docstr_tok: ["Prints","communication","statistics",".","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 print_communication_stats(self):
      """
      Prints communication statistics.
  
      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.
      """
      import crypten
  
      crypten.log("====Communication Stats====")
      crypten.log("Rounds: {}".format(self.comm_rounds))
      crypten.log("Bytes: {}".format(self.comm_bytes))
      crypten.log("Communication time: {}".format(self.comm_time))
  
imports: import sys
  import timeit
  from crypten.config import cfg
label_desc: Use image node_id 22 for calling the Communicator obj's underlying member method code with example usage: obj.print_communication_stats() without return types