def get_version(version):
assert len(version) == <NUM_LIT:5><EOL>assert version[<NUM_LIT:3>] in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>')<EOL>parts = <NUM_LIT:2> if version[<NUM_LIT:2>] == <NUM_LIT:0> else <NUM_LIT:3><EOL>main = '<STR_LIT:.>'.join(str(x) for x in version[:parts])<EOL>sub = '<STR_LIT>'<EOL>if version[<NUM_LIT:3>] != '<STR_LIT>':<EOL><INDENT>mapping = {'<STR_LIT>': '<STR_LIT:a>', '<STR_LIT>': '<STR_LIT:b>', '<STR_LIT>': '<STR_LIT:c>'}<EOL>sub = mapping[version[<NUM_LIT:3>]] + str(version[<NUM_LIT:4>])<EOL><DEDENT>return main + sub<EOL>
Returns a PEP 386-compliant version number from ``version``.