def METHOD_NAME():
    """
    torch.distributed does not seem to provide a function for this.
    Via mpirun (OpenMPI), this env variable would be set.
    It should fail with an error otherwise.
    """
    return int(os.environ["LOCAL_RANK"])