def METHOD_NAME():
    """
    Gets distributed rank or returns zero if distributed is not initialized.
    """
    if torch.distributed.is_available() and torch.distributed.is_initialized():
        rank = torch.distributed.METHOD_NAME()
    else:
        rank = 0
    return rank