def set_query_stats(query_idx, distances, match_ids):
        """Helper function to set per-query stats in the span."""
        _set_span_attribute(
            span,
            f"{AISpanAttributes.MILVUS_SEARCH_RESULT_COUNT}_{query_idx}",
            len(distances),
        )
Helper function to set per-query stats in the span.
packages/opentelemetry-instrumentation-milvus/opentelemetry/instrumentation/milvus/wrapper.py