def get_rank():
    """Gets the rank of the current process.

    Returns:
        the rank of the current process
    """
    if not dist.is_available():
        return 0

    if not dist.is_initialized():
        return 0

    return dist.get_rank()
Gets the rank of the current process.

    Returns:
        the rank of the current process
    
fiftyone/utils/torch.py