def str_args(args):
    """formats a list of function arguments prettily not as code

    (kwargs are tuples (argname, argvalue)
    """
    res = []
    for x in args:
        if isinstance(x, tuple) and len(x) == 2:
            key, value = x
            if value and str_arg(value):
                res += ["%s=%s" % (key, str_arg(value))]
        else:
            res += [str_arg(x)]
    return ', '.join(res)
formats a list of function arguments prettily not as code

    (kwargs are tuples (argname, argvalue)