code: def findlinestarts(code, dup_lines=False):
      
      if PYTHON3:
          byte_increments = code.co_lnotab[0::2]
          line_increments = code.co_lnotab[1::2]
      else:
          byte_increments = [ord(c) for c in code.co_lnotab[0::2]]
          line_increments = [ord(c) for c in code.co_lnotab[1::2]]
  
      lastlineno = None
      lineno = code.co_firstlineno
      addr = 0
      for byte_incr, line_incr in zip(byte_increments, line_increments):
          if byte_incr:
              if (lineno != lastlineno or
                  (not dup_lines and 0 < byte_incr < 255)):
                  yield (addr, lineno)
                  lastlineno = lineno
              addr += byte_incr
          if line_incr >= 0x80:
              # line_increments is an array of 8-bit signed integers
              line_incr -= 0x100
          lineno += line_incr
      if (lineno != lastlineno or
          (not dup_lines and 0 < byte_incr < 255)):
          yield (addr, lineno)
docs: Find the offsets in a byte code which are start of lines in the source.
  
      Generate pairs (offset, lineno) as described in Python/compile.c.