def METHOD_NAME(cls, docker_version: str) -> str:
    try:
        search_result = re.search(r"^\d\d.(\d\d|\d).(\d\d|\d)", docker_version)
        assert search_result  # nosec
        return search_result.group()
    except AttributeError:
        raise ValueError(  # pylint: disable=raise-missing-from
            f"{docker_version} appears not to be a valid docker version"
        )