def is_number_match(num1, num2):
 if (isinstance(num1, PhoneNumber) and isinstance(num2, PhoneNumber)):
  return _is_number_match_OO(num1, num2)
 elif isinstance(num1, PhoneNumber):
  return _is_number_match_OS(num1, num2)
 elif isinstance(num2, PhoneNumber):
  return _is_number_match_OS(num2, num1)
 else:
  return _is_number_match_SS(num1, num2)

def is_number_match ( num1 , num2 ) : if ( isinstance ( num1 , PhoneNumber ) and isinstance ( num2 , PhoneNumber ) ) : return _is_number_match_OO ( num1 , num2 ) elif isinstance ( num1 , PhoneNumber ) : return _is_number_match_OS ( num1 , num2 ) elif isinstance ( num2 , PhoneNumber ) : return _is_number_match_OS ( num2 , num1 ) else : return _is_number_match_SS ( num1 , num2 )
takes two phone numbers and compares them for equality .