

def _has_formatting_pattern_for_number(numobj):
    country_code = numobj.country_code
    phone_number_region = region_code_for_country_code(country_code)
    metadata = PhoneMetadata.metadata_for_region_or_calling_code(country_code, phone_number_region)
    if (metadata is None):
        return False
    national_number = national_significant_number(numobj)
    format_rule = _choose_formatting_pattern_for_number(metadata.number_format, national_number)
    return (format_rule is not None)

dataset/ETHPy150Open daviddrysdale/python-phonenumbers/python/phonenumbers/phonenumberutil.py _has_formatting_pattern_for_number/original