def _priority_key(pep8_result):
    priority = [
        'e701',
        'e702',
        'e225', 'e231',
        'e201',
        'e262'
    ]
    middle_index = 10000
    lowest_priority = [
        'e501'
    ]
    key = pep8_result['id'].lower()
    try:
        return priority.index(key)
    except ValueError:
        try:
            return middle_index + lowest_priority.index(key) + 1
        except ValueError:
            return middle_index