def _suggest_semantic_version(s):
result = s.strip().lower()<EOL>for pat, repl in _REPLACEMENTS:<EOL><INDENT>result = pat.sub(repl, result)<EOL><DEDENT>if not result:<EOL><INDENT>result = '<STR_LIT>'<EOL><DEDENT>m = _NUMERIC_PREFIX.match(result)<EOL>if not m:<EOL><INDENT>prefix = '<STR_LIT>'<EOL>suffix = result<EOL><DEDENT>else:<EOL><INDENT>prefix = m.groups()[<NUM_LIT:0>].split('<STR_LIT:.>')<EOL>prefix = [int(i) for i in prefix]<EOL>while len(prefix) < <NUM_LIT:3>:<EOL><INDENT>prefix.append(<NUM_LIT:0>)<EOL><DEDENT>if len(prefix) == <NUM_LIT:3>:<EOL><INDENT>suffix = result[m.end():]<EOL><DEDENT>else:<EOL><INDENT>suffix = '<STR_LIT:.>'.join([str(i) for i in prefix[<NUM_LIT:3>:]]) + result[m.end():]<EOL>prefix = prefix[:<NUM_LIT:3>]<EOL><DEDENT>prefix = '<STR_LIT:.>'.join([str(i) for i in prefix])<EOL>suffix = suffix.strip()<EOL><DEDENT>if suffix:<EOL><INDENT>for pat, repl in _SUFFIX_REPLACEMENTS:<EOL><INDENT>suffix = pat.sub(repl, suffix)<EOL><DEDENT><DEDENT>if not suffix:<EOL><INDENT>result = prefix<EOL><DEDENT>else:<EOL><INDENT>sep = '<STR_LIT:->' if '<STR_LIT>' in suffix else '<STR_LIT:+>'<EOL>result = prefix + sep + suffix<EOL><DEDENT>if not is_semver(result):<EOL><INDENT>result = None<EOL><DEDENT>return result<EOL>
Try to suggest a semantic form for a version for which
_suggest_normalized_version couldn't come up with anything.