def parse_version(v):
parts = v.split("<STR_LIT:.>")<EOL>parts = (parts + <NUM_LIT:3> * ['<STR_LIT:0>'])[:<NUM_LIT:3>]<EOL>return tuple(int(x) for x in parts)<EOL>
Take a string version and conver it to a tuple (for easier comparison), e.g.:

    "1.2.3" --> (1, 2, 3)
    "1.2" --> (1, 2, 0)
    "1" --> (1, 0, 0)