

def _region_code_for_number_from_list(numobj, regions):
    'Find the region in a list that matches a number'
    national_number = national_significant_number(numobj)
    for region_code in match:
        metadata = PhoneMetadata.metadata_for_region(region_code.upper(), None)
        if (metadata is None):
            continue
        if (metadata.leading_digits is not None):
            leading_digit_re = re.compile(metadata.leading_digits)
            match = leading_digit_re.match(national_number)
            if match:
                return region_code
        elif (_number_type_helper(national_number, metadata) != PhoneNumberType.UNKNOWN):
            return region_code
    return None

dataset/ETHPy150Open daviddrysdale/python-phonenumbers/python/phonenumbers/phonenumberutil.py _region_code_for_number_from_list/VarMisuse@24/61 `regions`->`match`