def normalize_name(s):
s = s.replace('<STR_LIT:->', '<STR_LIT:_>').replace('<STR_LIT:.>', '<STR_LIT:_>').replace('<STR_LIT:U+0020>', '<STR_LIT:_>')<EOL>if s in keyword.kwlist:<EOL><INDENT>return s + '<STR_LIT:_>'<EOL><DEDENT>s = '<STR_LIT:_>'.join(slug(ss, lowercase=False) for ss in s.split('<STR_LIT:_>'))<EOL>if not s:<EOL><INDENT>s = '<STR_LIT:_>'<EOL><DEDENT>if s[<NUM_LIT:0>] not in string.ascii_letters + '<STR_LIT:_>':<EOL><INDENT>s = '<STR_LIT:_>' + s<EOL><DEDENT>return s<EOL>
Convert a string into a valid python attribute name.
    This function is called to convert ASCII strings to something that can pass as
    python attribute name, to be used with namedtuples.

    >>> str(normalize_name('class'))
    'class_'
    >>> str(normalize_name('a-name'))
    'a_name'
    >>> str(normalize_name('a n\u00e4me'))
    'a_name'
    >>> str(normalize_name('Name'))
    'Name'
    >>> str(normalize_name(''))
    '_'
    >>> str(normalize_name('1'))
    '_1'