

def ndd_prefix_for_region(region_code, strip_non_digits):
    'Returns the national dialling prefix for a specific region.\n\n    For example, this would be 1 for the United States, and 0 for New\n    Zealand. Set strip_non_digits to True to strip symbols like "~" (which\n    indicates a wait for a dialling tone) from the prefix returned. If no\n    national prefix is present, we return None.\n\n    Warning: Do not use this method for do-your-own formatting - for some\n    regions, the national dialling prefix is used only for certain types of\n    numbers. Use the library\'s formatting functions to prefix the national\n    prefix when required.\n\n    Arguments:\n    region_code -- The region that we want to get the dialling prefix for.\n    strip_non_digits -- whether to strip non-digits from the national\n               dialling prefix.\n\n    Returns the dialling prefix for the region denoted by region_code.\n    '
    if (region_code is None):
        return None
    metadata = PhoneMetadata.metadata_for_region(region_code.upper(), None)
    if (strip_non_digits 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

dataset/ETHPy150Open daviddrysdale/python-phonenumbers/python/phonenumbers/phonenumberutil.py ndd_prefix_for_region/VarMisuse@44/397 `metadata`->`strip_non_digits`