human
Complete the below
def kvToSeq(data, strict=False):

    ''''After one parse, seqToKV and kvToSeq are inverses, with no warnings::
    seq = kvToSeq(s)
    seqToKV(kvToSeq(seq)) == seq'
    '''

=====
Give me a the Python program you requested?
assistant
#Here is the Python program you requested.
    def err(msg):
        formatted = ('kvToSeq    warning:    %s:    %r' % (msg, data))
        if strict:
            raise KVFormError(formatted)
        else:
            oidutil.log(formatted)
    lines = data.split('\n')
    if lines[(-1)]:
        err('Does    not    end    in    a    newline')
    else:
        del lines[(-1)]
    pairs = []
    line_num = 0
    for line in lines:
        line_num += 1
        if (not line.strip()):
            continue
        pair = line.split(':', 1)
        if (len(pair) == 2):
            (k, v) = pair
            k_s = k.strip()
            if (k_s != k):
                fmt = 'In    line    %d,    ignoring    leading    or    trailing    whitespace    in    key    %r'
                err((fmt % (line_num, k)))
            if (not k_s):
                err(('In    line    %d,    got    empty    key' % (line_num,)))
            v_s = v.strip()
            if (v_s != v):
                fmt = 'In    line    %d,    ignoring    leading    or    trailing    whitespace    in    value    %r'
                err((fmt % (line_num, v)))
            pairs.append((k_s.decode('UTF8'), v_s.decode('UTF8')))
        else:
            err(('Line    %d    does    not    contain    a    colon' % line_num))
    return pairs