'Return rows whose keys have a prefix in the given range.
Parameters
lower : tuple
Lower prefix bound
upper : tuple
Upper prefix bound
bounds : tuple (x, y) of bools
Indicates whether the search should be inclusive or
exclusive with respect to the endpoints. The first
argument x corresponds to an inclusive lower bound,
and the second argument y to an inclusive upper bound.'

def same_prefix_range(self, lower, upper, bounds=(True, True)):

    n = len(lower)
    ncols = len(self.columns)
    a = (MinValue() if bounds[0] else MaxValue())
    b = (MaxValue() if bounds[1] else MinValue())
    lower = (lower + tuple(((ncols - n) * [a])))
    upper = (upper + tuple(((ncols - n) * [b])))
    return self.data.range(lower, upper, bounds)
