code: def make_ranges(cls, lines):
          
          start_line = last_line = lines.pop(0)
          ranges = []
          for line in lines:
              if line == (last_line + 1):
                  last_line = line
              else:
                  ranges.append((start_line, last_line))
                  start_line = line
                  last_line = line
          ranges.append((start_line, last_line))
          return ranges
docs: Convert list of lines into list of line range tuples.
  
          Only will be called if there is one or more entries in the list. Single
          lines, will be coverted into tuple with same line.