'Extracts the country calling code from the beginning of
_national_number to _prefix_before_national_number when they are
available, and places the remaining input into _national_number.
Returns True when a valid country calling code can be found.'

def _attempt_to_extract_ccc(self):

    if (len(self._national_number) == 0):
        return False
    (country_code, number_without_ccc) = _extract_country_code(self._national_number)
    if (country_code == 0):
        return False
    self._national_number = number_without_ccc
    new_region_code = region_code_for_country_code(country_code)
    if (new_region_code == REGION_CODE_FOR_NON_GEO_ENTITY):
        self._current_metadata = PhoneMetadata.metadata_for_nongeo_region(country_code)
    elif (new_region_code != self._default_country):
        self._current_metadata = _get_metadata_for_region(new_region_code)
    self._prefix_before_national_number += str(country_code)
    self._prefix_before_national_number += _SEPARATOR_BEFORE_NATIONAL_NUMBER
    self._extracted_national_prefix = U_EMPTY_STRING
    return True
