class_docstr: A way to track the calls to distributed groups
class_docstr_tok: ["A","way","to","track","the","calls","to","distributed","groups"]
code: def allgather(self, output_tensors, input_tensors, *args, **kwargs):
      if self.listener is not None:
          self.listener(
              ProcessGroupTrackingEvent.allgather,
              output_tensors,
              input_tensors,
          )
      return self.group.allgather(
          output_tensors, input_tensors, *args, **kwargs
      )
  
imports: from contextlib import contextmanager
  from dataclasses import dataclass
  from enum import auto, Enum
  from functools import lru_cache
  from typing import Dict, List, NamedTuple, Tuple, Union
  import numpy
  import torch
  import torch.nn
  from fairscale.nn import FullyShardedDataParallel
  from vissl.utils.visualize import matplotlib_figure_to_image
label_desc: Use image node_id 2 for calling the ProcessGroupTracker obj's underlying member method code with example usage: obj.allgather(output_tensors, input_tensors) and returns: self