def _is_number_match_SS(number1, number2):
 try:
  numobj1 = parse(number1, UNKNOWN_REGION)
  return _is_number_match_OS(numobj1, number2)
 except NumberParseException:
  (_, exc, _) = sys.exc_info()
  if (exc.error_type == NumberParseException.INVALID_COUNTRY_CODE):
   try:
    numobj2 = parse(number2, UNKNOWN_REGION)
    return _is_number_match_OS(numobj2, number1)
   except NumberParseException:
    (_, exc2, _) = sys.exc_info()
    if (exc2.error_type == NumberParseException.INVALID_COUNTRY_CODE):
     try:
      numobj1 = parse(number1, None, keep_raw_input=False, _check_region=False, numobj=None)
      numobj2 = parse(number2, None, keep_raw_input=False, _check_region=False, numobj=None)
      return _is_number_match_OO(numobj1, numobj2)
     except NumberParseException:
      return MatchType.NOT_A_NUMBER
 return MatchType.NOT_A_NUMBER

def _is_number_match_SS ( number1 , number2 ) : try : numobj1 = parse ( number1 , UNKNOWN_REGION ) return _is_number_match_OS ( numobj1 , number2 ) except NumberParseException : ( _ , exc , _ ) = sys . exc_info ( ) if ( exc . error_type == NumberParseException . INVALID_COUNTRY_CODE ) : try : numobj2 = parse ( number2 , UNKNOWN_REGION ) return _is_number_match_OS ( numobj2 , number1 ) except NumberParseException : ( _ , exc2 , _ ) = sys . exc_info ( ) if ( exc2 . error_type == NumberParseException . INVALID_COUNTRY_CODE ) : try : numobj1 = parse ( number1 , None , keep_raw_input = False , _check_region = False , numobj = None ) numobj2 = parse ( number2 , None , keep_raw_input = False , _check_region = False , numobj = None ) return _is_number_match_OO ( numobj1 , numobj2 ) except NumberParseException : return MatchType . NOT_A_NUMBER return MatchType . NOT_A_NUMBER
takes two phone numbers as strings and compares them for equality .