human
Complete this python program:
def _parse(description):
assistant
#Here is the Python code you requested.

    """Convert a description string into a list of positional and keyword
    parameters, using logic vaguely like what Python does.
    @param description: a string as described by L{serverFromString} or
    L{clientFromString}.
    @return: a 2-tuple of C{(args, kwargs)}, where \args\ is a list of all
    \:\-separated C{str}s not containing an \=\ and \kwargs\ is a map of
    all C{str}s which do contain an \=\.  For example, the result of
    C{_parse(\a:b:d=1:c\)} would be C{([\a\, \b\, \c\], {\d\: \1\})}.
    """
    (args, kw) = ([], {})
    def add(sofar):
        if (len(sofar) == 1):
            args.append(sofar[0])
        else:
            kw[sofar[0]] = sofar[1]
    sofar = ()
    for (type, value) in _tokenize(description):
        if (type is _STRING):
            sofar += (value,)
        elif (value == ':'):
            add(sofar)
            sofar = ()
    add(sofar)
    return (args, kw)