def is_possible_short_number(numobj):
 region_codes = region_codes_for_country_code(numobj.country_code)
 short_number = national_significant_number(numobj)
 for region in region_codes:
  metadata = PhoneMetadata.short_metadata_for_region(region)
  if (metadata is None):
   continue
  if _is_number_possible_for_desc(short_number, metadata.general_desc):
   return True
 return False

def is_possible_short_number ( numobj ) : region_codes = region_codes_for_country_code ( numobj . country_code ) short_number = national_significant_number ( numobj ) for region in region_codes : metadata = PhoneMetadata . short_metadata_for_region ( region ) if ( metadata is None ) : continue if _is_number_possible_for_desc ( short_number , metadata . general_desc ) : return True return False
check whether a short number is a possible number .