human
I wrote the below code

    assert isinstance(args, list)
    def convert(arg):
        if six.PY2:
            if isinstance(arg, six.text_type):
                arg = arg.encode(arg_encoding())
        elif isinstance(arg, bytes):
            arg = arg.decode(arg_encoding(), 'surrogateescape')
        return arg
    return [convert(a) for a in args]

What's a good function header?
assistant
#Here's a good function header.

def convert_command_args(args):