

def _check_region_for_parsing(number, default_region):
    'Checks to see that the region code used is valid, or if it is not\n    valid, that the number to parse starts with a + symbol so that we can\n    attempt to infer the region from the number.  Returns False if it cannot\n    use the region provided and the region cannot be inferred.\n    '
    if (not _is_valid_region_code(default_region)):
        if ((number is None) or (len(number) == 0)):
            return False
        match = _PLUS_CHARS_PATTERN.match(default_region)
        if (match is None):
            return False
    return True

dataset/ETHPy150Open daviddrysdale/python-phonenumbers/python/phonenumbers/phonenumberutil.py _check_region_for_parsing/VarMisuse@55/195 `number`->`default_region`