code: def test_track_serve(
      mock_prometheus_client: MagicMock,
      mock_usage_event_debugging: MagicMock,
      mock_track_serve_init: MagicMock,
      mock_post: MagicMock,
      mock_do_not_track: MagicMock,
      simple_service: Service,
      monkeypatch: MonkeyPatch,
      caplog: LogCaptureFixture,
  ):
      mock_prometheus_client.multiproc.return_value = False
      mock_do_not_track.return_value = False
      mock_usage_event_debugging.return_value = True
  
      monkeypatch.setenv("__BENTOML_DEBUG_USAGE", "True")
      analytics.usage_stats.SERVE_USAGE_TRACKING_INTERVAL_SECONDS = 1
  
      with caplog.at_level(logging.INFO):
          with analytics.track_serve(
              simple_service,
              production=False,
              metrics_client=mock_prometheus_client,
              serve_info=analytics.usage_stats.get_serve_info(),
          ):
              import time
  
              time.sleep(2)
  
      assert not mock_post.called
      assert mock_do_not_track.called
      assert mock_track_serve_init.called
  
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 12 for calling a global function with example usage: test_track_serve(mock_prometheus_client, mock_usage_event_debugging, mock_track_serve_init, mock_post, mock_do_not_track, simple_service, monkeypatch, caplog) without return types