code: func FormatNationalNumberWithCarrierCode(number *PhoneNumber, carrierCode string) string {
  	countryCallingCode := int(number.GetCountryCode())
  	nationalSignificantNumber := GetNationalSignificantNumber(number)
  	if !hasValidCountryCallingCode(countryCallingCode) {
  		return nationalSignificantNumber
  	}
  	// Note GetRegionCodeForCountryCode() is used because formatting
  	// information for regions which share a country calling code is
  	// contained by only one region for performance reasons. For
  	// example, for NANPA regions it will be contained in the metadata for US.
  	regionCode := GetRegionCodeForCountryCode(countryCallingCode)
  	// Metadata cannot be null because the country calling code is valid.
  	metadata := getMetadataForRegionOrCallingCode(countryCallingCode, regionCode)
  
  	formattedNumber := builder.NewBuilder(nil)
  	formattedNumber.WriteString(
  		formatNsnWithCarrier(
  			nationalSignificantNumber,
  			metadata,
  			NATIONAL,
  			carrierCode))
  	maybeAppendFormattedExtension(number, metadata, NATIONAL, formattedNumber)
  	prefixNumberWithCountryCallingCode(
  		countryCallingCode,
  		NATIONAL,
  		formattedNumber)
  	return formattedNumber.String()
  }
docs: // Formats a phone number in national format for dialing using the carrier
  // as specified in the carrierCode. The carrierCode will always be used
  // regardless of whether the phone number already has a preferred domestic
  // carrier code stored. If carrierCode contains an empty string, returns
  // the number in national format without any carrier code.