def getDomainLabel(state, maze):
    """
    Return the domain LABEL (not index).
    :param state: state tuple
    :param maze: maze parameters
    :return: the domain LABEL
    """

    assert len(state) == 2 and state not in maze.WALL_STATES, 'ERROR: Cannot get domain for a wall state.'

    if state in maze.WALL_STATES or state == maze.START_STATE:
        domain = None
    elif state[0] <= 3 or state in [[4, 6], [5, 6]]:  # domain 1
        domain = 1
    elif state[0] >= 9 or state in [[7, 6], [8, 6]]:  # domain 2
        domain = 2
    elif state[1] <= 3 or state in [[6, 4], [6, 5]]:  # domain 3
        domain = 3
    elif state[1] >= 9 or state in [[6, 7], [6, 8]]:  # domain 4
        domain = 4
    else:
        raise ValueError(f'Cannot find domain for state {state}')

    return domain