def parse_version_string(version_string):
 if (version_string == 'latest'):
  version_string = max_version_string()
 try:
  return Version(*(int(value) for value in version_string.split('.', 1)))
 except (ValueError, TypeError) as exc:
  raise TypeError(('invalid version string: %s; %s' % (version_string, exc)))

def parse_version_string ( version_string ) : if ( version_string == 'latest' ) : version_string = max_version_string ( ) try : return Version ( * ( int ( value ) for value in version_string . split ( '.' , 1 ) ) ) except ( ValueError , TypeError ) as exc : raise TypeError ( ( 'invalid version string: %s; %s' % ( version_string , exc ) ) )
turn a version string into a version .