def binary_search(target, arr):
    """
    Binary search method for a sorted list of Node class objects.
    :param target: a Node object
    :param arr: a sorted list of Node objects
    :return: the index that target should insert into arr
    """
    left = 0
    right = len(arr) - 1
    while left <= right:
        mid = left + (right - left) // 2
        if arr[mid].value < target.value:
            left = mid + 1
        elif arr[mid].value > target.value:
            right = mid - 1
        else:
            return mid
    return -1