code: def test_legacy_get_metrics_report(
      mock_prometheus_client: MagicMock,
      mock_do_not_track: MagicMock,
      simple_service: Service,
  ):
      mock_do_not_track.return_value = True
      mock_prometheus_client.multiproc.return_value = False
      mock_prometheus_client.text_string_to_metric_families.return_value = text_string_to_metric_families(
          b"""\
  # HELP BENTOML_simple_service_request_in_progress Multiprocess metric
  # TYPE BENTOML_simple_service_request_in_progress gauge
  BENTOML_simple_service_request_in_progress{endpoint="/predict",service_version="not available"} 0.0
  # HELP BENTOML_simple_service_request_total Multiprocess metric
  # TYPE BENTOML_simple_service_request_total counter
  BENTOML_simple_service_request_total{endpoint="/predict",http_response_code="200",service_version="not available"} 8.0
  """.decode(
              "utf-8"
          )
      )
      output = analytics.usage_stats.get_metrics_report(
          mock_prometheus_client, serve_kind="http"
      )
      assert {
          "endpoint": "/predict",
          "http_response_code": "200",
          "service_version": "not available",
          "value": 8.0,
      } in output
  
      endpoints = [filtered["endpoint"] for filtered in output]
  
      assert not any(
          x in endpoints for x in analytics.usage_stats.EXCLUDE_PATHS
      )
  
imports: from __future__ import annotations
  import logging
  import typing
  from typing import TYPE_CHECKING
  from unittest.mock import Mock
  from unittest.mock import patch
  import pytest
  from prometheus_client.parser import text_string_to_metric_families
  from schema import And
  from schema import Or
  from schema import Schema
  import bentoml
  from bentoml._internal.utils import analytics
label_desc: Use image node_id 10 for calling a global function with example usage: test_legacy_get_metrics_report(mock_prometheus_client, mock_do_not_track, simple_service) without return types