code: def ConsumeRange(self, start, end):
      
      old = self.CurrentRange()
      if old is None:
        return
      if old.start > start:
        if old.start < end:
          raise RuntimeError('Block end too high.')
        return
      if old.start < start:
        raise RuntimeError('Block start too high.')
      if old.end == end:
        del self.ranges[0]
      elif old.end > end:
        self.ranges[0] = Range(end, old.end)
      else:
        raise RuntimeError('Block length exceeds range.')
docs: Consumes an entire range, or part thereof.
  
      If the finger has no ranges left, or the curent range start is higher
      than the end of the consumed block, nothing happens. Otherwise,
      the current range is adjusted for the consumed block, or removed,
      if the entire block is consumed. For things to work, the consumed
      range and the current finger starts must be equal, and the length
      of the consumed range may not exceed the length of the current range.
  
      Args:
        start: Beginning of range to be consumed.
        end: First offset after the consumed range (end + 1).
  
      Raises:
        RuntimeError: if the start position of the consumed range is
            higher than the start of the current range in the finger, or if
            the consumed range cuts accross block boundaries.