class_docstr: Implementation of the distributed helper.
  
  Methods of this class can be used as an high-level wrappers
  aroung the torch.ddistributed API to allow for a simpler
  distributed communication.
  
  Only a single object of this class is instantiated
  as the "DistributedHelper" singleton.
  
  
  Note: differently from the original Pytorch API, which requires
  that input tensor(s) to be moved to the default device (forced to
  CUDA if using NCCL), these functions usually also manage input tensors
  residing on a different devices. The returned elements will
  be moved to the same device of the input tensor. Consider looking at
  the documentation of each method for more details.
class_docstr_tok: ["Implementation","of","the","distributed","helper",".","Methods","of","this","class","can","be","used","as","an","high-level","wrappers","aroung","the","torch.ddistributed","API","to","allow","for","a","simpler","distributed","communication",".","Only","a","single","object","of","this","class","is","instantiated","as","the","``","DistributedHelper","''","singleton",".","Note",":","differently","from","the","original","Pytorch","API",",","which","requires","that","input","tensor","(","s",")","to","be","moved","to","the","default","device","(","forced","to","CUDA","if","using","NCCL",")",",","these","functions","usually","also","manage","input","tensors","residing","on","a","different","devices",".","The","returned","elements","will","be","moved","to","the","same","device","of","the","input","tensor",".","Consider","looking","at","the","documentation","of","each","method","for","more","details","."]
docstr: Check if running is the main process.
  
  :return: True if running in the main process (or not running a
      distributed training), False otherwise.
docstr_tok: ["Check","if","running","is","the","main","process",".",":","return",":","True","if","running","in","the","main","process","(","or","not","running","a","distributed","training",")",",","False","otherwise","."]
code: def is_main_process(self) -> bool:
      """
      Check if running is the main process.
  
      :return: True if running in the main process (or not running a
          distributed training), False otherwise.
      """
      return self.rank == 0
  
imports: import os
  import pickle
  import warnings
  from io import BytesIO
  from typing import ContextManager, Optional, List, Any, Iterable, Dict, TypeVar
  import torch
  from torch import Tensor
  from torch.nn.modules import Module
  from torch.nn.parallel import DistributedDataParallel
  from typing_extensions import Literal
  from torch.distributed import init_process_group, broadcast_object_list
  from avalanche.distributed.distributed_consistency_verification import hash_tensor
label_desc: Use image node_id 24 for calling the _DistributedHelperCls obj's underlying member method code with example usage: obj.is_main_process() and returns: unknown