def METHOD_NAME():
    """Detect the number of nodes of the training job."""
    if dc.INITIALIZED:
        # If job is launched by atorch
        return dc.NODE_SIZE
    elif os.environ.get("WORLD_SIZE", None):
        # get the number nodes from Environment Variable
        return int(os.environ["WORLD_SIZE"])
    else:
        return 1