def is_alignment_consistent(start, end, token_to_node, node_to_token):
    """
    Check whether alignment between token span start:end and corresponding DMRS nodes is consistent.
    :param start: Start token index
    :param end: End token index
    :param token_to_node: Token to node alignment dictionary
    :param node_to_token: Node to token alignment dictionary
    :return: Boolean
    """

    aligned_node_list = list()

    token_list = range(start, end + 1)
    for token in token_list:
        aligned_node_list.extend(token_to_node[token])

    aligned_token_list = list()
    for node in aligned_node_list:
        aligned_token_list.extend(node_to_token[node])

    if set(token_list) == set(aligned_token_list):
        return True
    else:
        return False