def wrap(t):
k,v = t<EOL>if isinstance(v, (list, tuple)):<EOL><INDENT>if len(v) == <NUM_LIT:0>:<EOL><INDENT>rv = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>if k in semi_quad_tags:<EOL><INDENT>rv = wrapListOfQuads(v)<EOL><DEDENT>elif k in interval_list_tags:<EOL><INDENT>rv = wrapListWithFormat(v, '<STR_LIT>')<EOL><DEDENT>elif k in size_range_list_tags:<EOL><INDENT>rv = wrapListWithFormat(v, '<STR_LIT>')<EOL><DEDENT>elif isinstance(v[<NUM_LIT:0>], (list, tuple)):<EOL><INDENT>rv = wrapListWithFormat(v, '<STR_LIT>')<EOL><DEDENT>elif isinstance(v[<NUM_LIT:0>], int):<EOL><INDENT>rv = '<STR_LIT:U+0020>'.join(map(str, v))<EOL><DEDENT>else:<EOL><INDENT>rv = v<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>rv = v<EOL><DEDENT>return k, rv<EOL>
Convert a primer3 input in python-friendly bindings-style form
    to a string form for use by the process wrapper

    >>> wrap(('SEQUENCE_TEMPLATE', 'ATCG'))
    ('SEQUENCE_TEMPLATE', 'ATCG')

    >>> wrap(('SEQUENCE_QUALITY', range(5)))
    ('SEQUENCE_QUALITY', '0 1 2 3 4')

    >>> wrap(('SEQUENCE_EXCLUDED_REGION', (5,7)))
    ('SEQUENCE_EXCLUDED_REGION', '5,7')

    >>> wrap(('SEQUENCE_EXCLUDED_REGION', [(5,7), (11,13)]))
    ('SEQUENCE_EXCLUDED_REGION', '5,7 11,13')

    >>> wrap(('PRIMER_PRODUCT_SIZE_RANGE', (7,11)))
    ('PRIMER_PRODUCT_SIZE_RANGE', '7-11')