def _suggest_normalized_version(s):
try:<EOL><INDENT>_normalized_key(s)<EOL>return s   <EOL><DEDENT>except UnsupportedVersionError:<EOL><INDENT>pass<EOL><DEDENT>rs = s.lower()<EOL>for orig, repl in (('<STR_LIT>', '<STR_LIT:a>'), ('<STR_LIT>', '<STR_LIT:b>'), ('<STR_LIT>', '<STR_LIT:a>'),<EOL>('<STR_LIT>', '<STR_LIT:b>'), ('<STR_LIT>', '<STR_LIT:c>'), ('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT:c>'),<EOL>('<STR_LIT>', '<STR_LIT>'), ('<STR_LIT>', '<STR_LIT>'), ('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT:+>', '<STR_LIT:.>'), ('<STR_LIT:_>', '<STR_LIT:.>'), ('<STR_LIT:U+0020>', '<STR_LIT>'), ('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>')):<EOL><INDENT>rs = rs.replace(orig, repl)<EOL><DEDENT>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>if rs.startswith('<STR_LIT:v>'):<EOL><INDENT>rs = rs[<NUM_LIT:1>:]<EOL><DEDENT>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", "<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>rs = re.sub(r"<STR_LIT>", r"<STR_LIT>", rs)<EOL>try:<EOL><INDENT>_normalized_key(rs)<EOL><DEDENT>except UnsupportedVersionError:<EOL><INDENT>rs = None<EOL><DEDENT>return rs<EOL>
Suggest a normalized version close to the given version string.

    If you have a version string that isn't rational (i.e. NormalizedVersion
    doesn't like it) then you might be able to get an equivalent (or close)
    rational version from this function.

    This does a number of simple normalizations to the given string, based
    on observation of versions currently in use on PyPI. Given a dump of
    those version during PyCon 2009, 4287 of them:
    - 2312 (53.93%) match NormalizedVersion without change
      with the automatic suggestion
    - 3474 (81.04%) match when using this suggestion method

    @param s {str} An irrational version string.
    @returns A rational version string, or None, if couldn't determine one.