def str_type(a):
if six.PY2:<EOL><INDENT>return str(a, SYS_ENCODING)<EOL><DEDENT>else:<EOL><INDENT>return str(a)<EOL><DEDENT>
A string type for the `argparse.add_argument` ``type`` argument.

    This function fixes some issue where Python 2.7's argparse does not accept
    unicode values passed as arguments that are of the `future.types.newstr`
    type.