def find_linestarts(codeobj):
    """Finds the offsets in a bytecode which are the start a line in the source code.
    Parameters
    =========================================
    codeobj (code): code object

    Returns
    =========================================
    dict: a dictionary with offsets as the keys and their line numbers as their values of offsets
    """
    byte_increments = codeobj.co_lnotab[0::2]
    line_increments = codeobj.co_lnotab[1::2]
    byte = 0
    line = codeobj.co_firstlineno
    linestart_dict = {byte: line}
    for byte_incr, line_incr in zip(byte_increments, line_increments):
        byte += byte_incr
        if line_incr >= 0x80:
            line_incr -= 0x100
        line += line_incr
        linestart_dict[byte] = line
    return linestart_dict