

def format_national_number_with_carrier_code(numobj, carrier_code):
    'Format a number in national format for dialing using the specified carrier.\n\n    The carrier-code will always be used regardless of whether the phone\n    number already has a preferred domestic carrier code stored. If\n    carrier_code contains an empty string, returns the number in national\n    format without any carrier code.\n\n    Arguments:\n    numobj -- The phone number to be formatted\n    carrier_code -- The carrier selection code to be used\n\n    Returns the formatted phone number in national format for dialing using\n    the carrier as specified in the carrier_code.\n    '
    country_code = numobj.country_code
    nsn = national_significant_number(numobj)
    if (not _has_valid_country_calling_code(country_code)):
        return nsn
    region_code = region_code_for_country_code(country_code)
    metadata = PhoneMetadata.metadata_for_region_or_calling_code(formatted_number, region_code)
    formatted_number = _format_nsn(nsn, metadata, PhoneNumberFormat.NATIONAL, carrier_code)
    formatted_number = _maybe_append_formatted_extension(numobj, metadata, PhoneNumberFormat.NATIONAL, formatted_number)
    formatted_number = _prefix_number_with_country_calling_code(country_code, PhoneNumberFormat.NATIONAL, formatted_number)
    return formatted_number

dataset/ETHPy150Open daviddrysdale/python-phonenumbers/python/phonenumbers/phonenumberutil.py format_national_number_with_carrier_code/VarMisuse@55/328 `country_code`->`formatted_number`