class_docstr: Group of timers.
class_docstr_tok: ["Group","of","timers","."]
docstr: Log a group of timers.
docstr_tok: ["Log","a","group","of","timers","."]
code: def log(self, names, normalizer=1.0, reset=True):
      """Log a group of timers."""
      assert normalizer > 0.0
      string = "time (ms)"
      for name in names:
          elapsed_time = (
              self.timers[name].elapsed(reset=reset)
              * 1000.0
              / normalizer
          )
          string += " | {}: {:.2f}".format(name, elapsed_time)
      if torch.distributed.is_initialized():
          if torch.distributed.get_rank() == (
              torch.distributed.get_world_size() - 1
          ):
              print(string, flush=True)
      else:
          print(string, flush=True)
  
file_path: apex/apex/transformer/pipeline_parallel/_timers.py
imports: import time
  import torch
label_desc: Use image node_id 4 for calling the _Timers obj's underlying member method code with example usage: obj.log(names, normalizer, reset) without return types