def version_mismatch_enricher(alert: PrometheusKubernetesAlert, params: VersionMismatchParams):
    """
    Enriches the finding with a prometheus query

    for example prometheus queries see here:
    https://prometheus.io/docs/prometheus/latest/querying/examples/
    """

    query_result = run_prometheus_query(prometheus_params=params, query=params.version_mismatch_query)
    if query_result.result_type == "error" or query_result.vector_result is None:
        logging.error(f"version_mismatch_enricher failed to get prometheus results.")
        return

    build_infos = BuildInfoResults(query_result)
    if not build_infos.is_results_valid():
        logging.error(f"Invalid prometheus results for version_mismatch_enricher.")
        return

    if len(build_infos.api_versions) == 0:
        api_version_string = f"version is unknown"
    elif len(build_infos.api_versions) > 1:
        api_version_string = f"has reported versions {', '.join(build_infos.api_versions)}"
    else:  # one build version
        api_version_string = f"is version {build_infos.api_versions[0]}"

    # in the case where a node is of a higher version than the api server
    alert.add_enrichment(
        [
            MarkdownBlock(f"The kubernetes api server {api_version_string}."),
            TableBlock(
                build_infos.results_to_node_table(),
                ["name", "version"],
                table_name="*Node Versions*",
            ),
            MarkdownBlock(
                f"To solve this alert, make sure to update all of your nodes and/or cluster to the latest version above."
            ),
        ],
        annotations={SlackAnnotations.ATTACHMENT: True},
    )

    Enriches the finding with a prometheus query

    for example prometheus queries see here:
    https://prometheus.io/docs/prometheus/latest/querying/examples/
    
playbooks/robusta_playbooks/version_mismatch_enricher.py