def METHOD_NAME(projects: QuerySet[IastProject], bind_project_id: int, project_version_id: int):
    from elasticsearch import Elasticsearch
    from elasticsearch_dsl import A, Q
    from dongtai_common.models.strategy import IastStrategyModel
    from dongtai_common.models.vul_level import IastVulLevel
    from dongtai_common.models.vulnerablity import (
        IastVulnerabilityDocument,
        IastVulnerabilityStatus,
    )
    strategy_ids = list(IastStrategyModel.objects.all().values_list("id", flat=True))
    must_query = [
        Q("terms", bind_project_id=list(projects.values_list("id", flat=True))),
        Q("terms", is_del=[0]),
        Q("terms", is_del=[0]),
        Q("range", bind_project_id={"gt": 0}),
        Q("range", strategy_id={"gt": 0}),
        Q("terms", strategy_id=strategy_ids),
    ]
    if bind_project_id:
        must_query.append(Q("terms", bind_project_id=[bind_project_id]))
    if project_version_id:
        must_query.append(Q("terms", project_version_id=[project_version_id]))
    search = IastVulnerabilityDocument.search().query(Q("bool", must=must_query))[:0]
    buckets = {
        "level": A("terms", field="level_id", size=2147483647),
        "strategy": A("terms", field="strategy_id", size=2147483647),
        "status": A("terms", field="status_id", size=2147483647),
    }
    buckets = patch_point(buckets)
    for k, v in buckets.items():
        search.aggs.bucket(k, v)
    from dongtai_conf import settings
    res = search.using(Elasticsearch(settings.ELASTICSEARCH_DSL["default"]["hosts"])).execute()
    dic = {}
    for key_ in buckets:
        key = key_
        origin_buckets = res.aggs[key].to_dict()["buckets"]
        for i in origin_buckets:
            i["id"] = i["key"]
            del i["key"]
            i["num"] = i["doc_count"]
            del i["doc_count"]
        if key == "strategy":
            strategy_ids = [i["id"] for i in origin_buckets]
            strategy = IastStrategyModel.objects.filter(pk__in=strategy_ids).values("id", "vul_name").all()
            strategy_dic = dict_transfrom(strategy, "id")
            for i in origin_buckets:
                i["name"] = strategy_dic[i["id"]]["vul_name"]
            key = "hook_type"
        if key == "status":
            status_ids = [i["id"] for i in origin_buckets]
            status = IastVulnerabilityStatus.objects.filter(pk__in=status_ids).values("id", "name").all()
            status_dic = dict_transfrom(status, "id")
            for i in origin_buckets:
                i["name"] = status_dic[i["id"]]["name"]
        if key == "level":
            level_ids = [i["id"] for i in origin_buckets]
            level = IastVulLevel.objects.filter(pk__in=level_ids).values("id", "name_value").all()
            level_dic = dict_transfrom(level, "id")
            for i in origin_buckets:
                i["name"] = level_dic[i["id"]]["name_value"]
            origin_buckets = sorted(origin_buckets, key=lambda x: x["id"])
        key, origin_buckets = patch_point(key, origin_buckets)
        dic[key] = list(origin_buckets)
    return dict(dic)