def region_code_for_number(numobj):
 country_code = numobj.country_code
 regions = COUNTRY_CODE_TO_REGION_CODE.get(country_code, None)
 if (regions is None):
  return None
 if (len(regions) == 1):
  return regions[0]
 else:
  return _region_code_for_number_from_list(numobj, regions)

def region_code_for_number ( numobj ) : country_code = numobj . country_code regions = COUNTRY_CODE_TO_REGION_CODE . get ( country_code , None ) if ( regions is None ) : return None if ( len ( regions ) == 1 ) : return regions [ 0 ] else : return _region_code_for_number_from_list ( numobj , regions )
returns the region where a phone number is from .