code: def test_filter_metrics_report(
      mock_prometheus_client: MagicMock,
      mock_output: bytes,
      expected: tuple[list[t.Any], bool | None],
      serve_kind: str,
  ):
      mock_prometheus_client.multiproc.return_value = False
      mock_prometheus_client.generate_latest.return_value = mock_output
      assert (
          analytics.usage_stats.get_metrics_report(
              mock_prometheus_client, serve_kind=serve_kind
          )
          == expected
      )
  
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 8 for calling a global function with example usage: test_filter_metrics_report(mock_prometheus_client, mock_output, expected, serve_kind) without return types