def METHOD_NAME(self, version):
    if version == '':
        raise Exception('version is required')
    result = {
        KUBE_RESOLVED_SEM: version,
        KUBE_RESOLVED_SRC: 'pkg',
        KUBE_RESOLVED_VER: version,
    }
    # When version is 'latest' then the returned dictionary points
    # to the latest package for Kubernetes.
    if version == 'latest':
        return result
    # Otherwise check to see if the provided version matches a
    # managed package format. Technically the else clause could be
    # descoped one level, but by placing the logic in the scope of
    # the else clause, the scope of 'match' is isolated from the
    # rest of this function.
    else:
        match = re.match(r'^(\d+\.\d+.\d+)\-\d+$', version)
        if match:
            version = match.groups(1)[0]
            result[KUBE_RESOLVED_SEM] = f'v{version}'
            return result
    url = ''
    if re.match(r'(?i)^https?:', version):
        url = version
    elif re.match(r'^v?\d+(?:\.\d+){0,3}(?:[.+-].+)?$', version):
        if not version.startswith('v'):
            version = f'v{version}'
        url = f'{KUBE_SRC}/release/{version}'
    elif re.match(r'^(ci|release)/.+$', version):
        url = self.__resolve_build_url(version)
    else:
        raise Exception(f'Invalid Kubernetes version: {version}')
    result[KUBE_RESOLVED_SRC] = url
    version = self.__read_version_from_kube_tarball(url)
    result[KUBE_RESOLVED_SEM] = version
    result[KUBE_RESOLVED_VER] = version
    return result