def get_id_pair_from_nodes(node1, node2):
    """
    This method returns a sorted pair of ids corresponding to two different nodes
    :param node1: The first Node object
    :param node2: The second Node object
    :return: A sorted pair (id1, id2) of the corresponding ids such that id1 < id2
    """

    id1, id2 = node1.id, node2.id
    if id1 < id2:
        return id1, id2
    return id2, id1