def set_global_stats():
        """Helper function to set global stats for a single query."""
        _set_span_attribute(
            span, AISpanAttributes.MILVUS_SEARCH_RESULT_COUNT, total_matches
        )
Helper function to set global stats for a single query.
packages/opentelemetry-instrumentation-milvus/opentelemetry/instrumentation/milvus/wrapper.py