r"""
    Args:
        code (str):

    CommandLine:
        python -m utool.util_str --exec-autoformat_pep8

    Kwargs:
        'aggressive': 0,
        'diff': False,
        'exclude': [],
        'experimental': False,
        'files': [u''],
        'global_config': ~/.config/pep8,
        'ignore': set([u'E24']),
        'ignore_local_config': False,
        'in_place': False,
        'indent_size': 4,
        'jobs': 1,
        'line_range': None,
        'list_fixes': False,
        'max_line_length': 79,
        'pep8_passes': -1,
        'recursive': False,
        'select': ,
        'verbose': 0,

    Ignore:
        autopep8 --recursive --in-place --ignore E126,E127,E201,E202,E203,E221,E222,E241,E265,E271,E272,E301,E501,W602,E266,N801,N802,N803,N805,N806,N811,N813 .

def autoformat_pep8(sourcecode, **kwargs):
    r"""
    Args:
        code (str):

    CommandLine:
        python -m utool.util_str --exec-autoformat_pep8

    Kwargs:
        'aggressive': 0,
        'diff': False,
        'exclude': [],
        'experimental': False,
        'files': [u''],
        'global_config': ~/.config/pep8,
        'ignore': set([u'E24']),
        'ignore_local_config': False,
        'in_place': False,
        'indent_size': 4,
        'jobs': 1,
        'line_range': None,
        'list_fixes': False,
        'max_line_length': 79,
        'pep8_passes': -1,
        'recursive': False,
        'select': ,
        'verbose': 0,

    Ignore:
        autopep8 --recursive --in-place --ignore E126,E127,E201,E202,E203,E221,E222,E241,E265,E271,E272,E301,E501,W602,E266,N801,N802,N803,N805,N806,N811,N813 .
    """
    import autopep8
    default_ignore = {
        'E126',  # continuation line hanging-indent
        'E127',  # continuation line over-indented for visual indent
        'E201',  # whitespace after '('
        'E202',  # whitespace before ']'
        'E203',  # whitespace before ', '
        'E221',  # multiple spaces before operator
        'E222',  # multiple spaces after operator
        'E241',  # multiple spaces after ,
        'E265',  # block comment should start with "# "
        'E271',  # multiple spaces after keyword
        'E272',  # multiple spaces before keyword
        'E301',  # expected 1 blank line, found 0
        'E501',  # line length > 79
        'W602',  # Old reraise syntax
        'E266',  # too many leading '#' for block comment
        'N801',  # function name should be lowercase [N806]
        'N802',  # function name should be lowercase [N806]
        'N803',  # argument should be lowercase [N806]
        'N805',  # first argument of a method should be named 'self'
        'N806',  # variable in function should be lowercase [N806]
        'N811',  # constant name imported as non constant
        'N813',  # camel case
    }
    # My defaults
    kwargs['ignore'] = kwargs.get('ignore', default_ignore)
    kwargs['aggressive'] = kwargs.get('aggressive', 1)
    pep8_options = autopep8._get_options(kwargs, False)
    new_source = autopep8.fix_code(sourcecode, pep8_options)
    return new_source