code: def append(self, raw_name, record_name, latency, msg_size):
      algbw, busbw = calc_bw_log(raw_name, msg_size, latency)
      if record_name in self.comms_dict.keys():
          # If this comm_op has already been logged with this message size, just add to existing record
          if msg_size in self.comms_dict[record_name].keys():
              self.comms_dict[record_name][msg_size][0] += 1
              self.comms_dict[record_name][msg_size][1].append(latency)
              self.comms_dict[record_name][msg_size][2].append(algbw)
              self.comms_dict[record_name][msg_size][3].append(busbw)
          # If this is a new message size for this comm_op, add new record under existing comm_op
          else:
              self.comms_dict[record_name][msg_size] = [
                  1,
                  [latency],
                  [algbw],
                  [busbw],
              ]
      else:
          # Create entirely new record
          self.comms_dict[record_name] = {
              msg_size: [1, [latency], [algbw], [busbw]]
          }
      # If verbose, print every comm op
      # TODO: Add to tensorboard
      if self.verbose:
          log_str = f"comm op: {record_name} | time (ms): {latency:.2f} | msg size: {convert_size(msg_size)} | algbw (Gbps): {algbw:.2f} | busbw (Gbps): {busbw:.2f}"
          log_dist(log_str, [0])
  
file_path: DeepSpeed/deepspeed/utils/comms_logging.py
imports: import math
  from deepspeed.utils import log_dist
label_desc: Use image node_id 7 for calling the CommsLogger obj's underlying member method code with example usage: obj.append(raw_name, record_name, latency, msg_size) without return types