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, rank=None, normalizer=1.0, reset=True, barrier=False
  ):
      """Log a group of timers."""
  
      # Print.
      assert normalizer > 0.0
      if self._log_option in ["max", "minmax"]:
          max_only = False
          if self._log_option == "max":
              max_only = True
          output_string = self._get_global_min_max_time_string(
              names, reset, barrier, normalizer / 1000.0, max_only
          )
      elif self._log_option == "all":
          output_string = self._get_all_ranks_time_string(
              names, reset, barrier, normalizer / 1000.0
          )
      else:
          raise Exception(
              "unknown timing log option {}".format(self._log_option)
          )
  
      # If no input rank is provided, log on last rank.
      if rank is None:
          rank = torch.distributed.get_world_size() - 1
      if (
          rank == torch.distributed.get_rank()
          and output_string is not None
      ):
          print(output_string, flush=True)
  
imports: from abc import ABC
  from abc import abstractmethod
  import time
  import torch
label_desc: Use image node_id 7 for calling the Timers obj's underlying member method code with example usage: obj.log(names, rank, normalizer, reset, barrier) without return types