

def number_type(numobj):
    'Gets the type of a phone number.\n\n    Arguments:\n    numobj -- The PhoneNumber object that we want to know the type of.\n\n    Returns the type of the phone number, as a PhoneNumberType value.\n    '
    region_code = region_code_for_number(numobj)
    metadata = PhoneMetadata.metadata_for_region_or_calling_code(numobj.country_code, region_code)
    if (metadata is None):
        return PhoneNumberType.UNKNOWN
    national_number = national_significant_number(numobj)
    return _number_type_helper(national_number, metadata)

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