def is_distributed() -> bool:
    """
    Checks if the distributed process group is available and has been initialized
    """
    return dist.is_available() and dist.is_initialized()
Checks if the distributed process group is available and has been initialized
allennlp/common/util.py