def validate_removal_semver(removal_version):
 if (removal_version is None):
  raise MissingRemovalVersionError(u'The removal version must be provided.')
 if (not isinstance(removal_version, six.string_types)):
  raise BadRemovalVersionError(u'The removal_version must be a version string.')
 try:
  v = Version(removal_version)
  if (len(v.base_version.split(u'.')) != 3):
   raise BadRemovalVersionError(u'The given removal version {} is not a valid version: {}'.format(removal_version, removal_version))
  return v
 except InvalidVersion as e:
  raise BadRemovalVersionError(u'The given removal version {} is not a valid version: {}'.format(removal_version, e))

def validate_removal_semver ( removal_version ) : if ( removal_version is None ) : raise MissingRemovalVersionError ( u'The removal version must be provided.' ) if ( not isinstance ( removal_version , six . string_types ) ) : raise BadRemovalVersionError ( u'The removal_version must be a version string.' ) try : v = Version ( removal_version ) if ( len ( v . base_version . split ( u'.' ) ) != 3 ) : raise BadRemovalVersionError ( u'The given removal version {} is not a valid version: {}' . format ( removal_version , removal_version ) ) return v except InvalidVersion as e : raise BadRemovalVersionError ( u'The given removal version {} is not a valid version: {}' . format ( removal_version , e ) )
validates that removal_version is a valid semver .