docstr: Reuse Pytorch ProcessGroup when such a group is initialized
docstr_tok: ["Reuse","Pytorch","ProcessGroup","when","such","a","group","is","initialized"]
code: def get(self, rank_list: List[int], backend: str = "nccl"):
      """Reuse Pytorch ProcessGroup when such a group is initialized"""
      # we need to convert the passed list to a tuple
      # since List is unhashable
      processgroup_key = (backend, tuple(rank_list))
      if processgroup_key not in self.dict:
          self.log_pg_init(rank_list=rank_list, backend=backend)
          self.dict[processgroup_key] = torch.distributed.new_group(
              ranks=rank_list, backend=backend
          )
      return self.dict[processgroup_key]
  
imports: from typing import List, Optional
  import torch
  from colossalai.context.singleton_meta import SingletonMeta
  from colossalai.logging import get_dist_logger
label_desc: Use image node_id 3 for calling the PyTorchProcessGroupDict obj's underlying member method code with example usage: obj.get(rank_list, backend) and returns: self