code: def log_all(self):
      from deepspeed.utils.timer import trim_mean
  
      print(
          f"{'Comm. Op': <20}{'Message Size': <20}{'Count': <20}{'Total Latency(ms)': <20}{'Avg Latency(ms)': <20}{'tput_avg (Gbps)': <20}{'busbw_avg (Gbps)': <20}"
      )
      for record_name in self.comms_dict.keys():
          print(record_name)
          for msg_size, vals in sorted(
              self.comms_dict[record_name].items()
          ):
              # vals[0] is the count for each msg size
              count = vals[0]
              # vals[1] is a list of latency records for each msg size
              total_lat = sum(vals[1])
              # vals[2] and vals[3] are the lists of algbw and busbw, respectively
              # Get rid of outliers when we print
              avg_lat = trim_mean(vals[1], 0.1)
              avg_algbw = trim_mean(vals[2], 0.1)
              avg_busbw = trim_mean(vals[3], 0.1)
              print(
                  f"{' ': <20}{convert_size(msg_size): <20}{count: <20}{total_lat: <20.2f}{avg_lat: <20.2f}{avg_algbw: <20.2f}{avg_busbw: <20.2f}"
              )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/DeepSpeed/deepspeed/utils/comms_logging.py
imports: import math
  from deepspeed.utils import log_dist
label_desc: Use image node_id 8 for calling the CommsLogger obj's underlying member method code with example usage: obj.log_all() without return types