def ndd_prefix_for_region(region_code, strip_non_digits):
 if (region_code is None):
  return None
 metadata = PhoneMetadata.metadata_for_region(region_code.upper(), None)
 if (metadata is None):
  return None
 national_prefix = metadata.national_prefix
 if ((national_prefix is None) or (len(national_prefix) == 0)):
  return None
 if strip_non_digits:
  national_prefix = re.sub(U_TILDE, U_EMPTY_STRING, national_prefix)
 return national_prefix

def ndd_prefix_for_region ( region_code , strip_non_digits ) : if ( region_code is None ) : return None metadata = PhoneMetadata . metadata_for_region ( region_code . upper ( ) , None ) if ( metadata is None ) : return None national_prefix = metadata . national_prefix if ( ( national_prefix is None ) or ( len ( national_prefix ) == 0 ) ) : return None if strip_non_digits : national_prefix = re . sub ( U_TILDE , U_EMPTY_STRING , national_prefix ) return national_prefix
returns the national dialling prefix for a specific region .