(self, index)
return self.node_tuples[hi-1]
Return the node with the largest index <= the given index.
        In other words, this is the node we need to rewind to.
Return the node with the largest index <= the given index.
        In other words, this is the node we need to rewind to.
Return the node with the largest index < = the given index . In other words this is the node we need to rewind to .
def tuple_for_index(self, index):
        """
        Return the node with the largest index <= the given index.
        In other words, this is the node we need to rewind to.
        """
        lo = 0
        hi = len(self.node_tuples)
        if hi == 0:
            return GENESIS_TUPLE
        while lo < hi:
            idx = int((lo+hi)/2)
            if self.node_tuples[idx][0] > index:
                hi = idx
            else:
                lo = idx + 1
        return self.node_tuples[hi-1]
def tuple_for_index ( self , index ) : lo = 0 hi = len ( self . node_tuples ) if hi == 0 : return GENESIS_TUPLE while lo < hi : idx = int ( ( lo + hi ) / 2 ) if self . node_tuples [ idx ] [ 0 ] > index : hi = idx else : lo = idx + 1 return self . node_tuples [ hi - 1 ]