def indices_between(self, x1, x2, beyond=0):
    leftidx = max(0, (bisect(self.points, (x1, None)) - beyond))
    rightidx = min(len(self.points), (bisect(self.points, (x2, None)) + beyond))
    return list(range(leftidx, rightidx))
def indices_between(self, x1, x2, beyond=0):
    leftidx = max(0, (bisect(self.points, (x1, None)) - beyond))
    rightidx = min(len(self.points), (bisect(self.points, (x2, None)) + beyond))
    return list(range(leftidx, rightidx))