code: def test_track_serve_init(
      mock_usage_event_debugging: MagicMock,
      mock_do_not_track: MagicMock,
      mock_post: MagicMock,
      simple_service: Service,
      production: bool,
      caplog: LogCaptureFixture,
  ):
      mock_do_not_track.return_value = False
      mock_usage_event_debugging.return_value = False
  
      mock_response = Mock()
      mock_post.return_value = mock_response
      mock_response.text = "sent"
  
      analytics.usage_stats._track_serve_init(  # type: ignore (private warning)
          simple_service,
          production=production,
          serve_info=analytics.usage_stats.get_serve_info(),
          serve_kind="http",
          from_server_api=False,
      )
  
      assert mock_do_not_track.called
      assert mock_post.called
  
      mock_usage_event_debugging.return_value = True
      with caplog.at_level(logging.INFO):
          analytics.usage_stats._track_serve_init(  # type: ignore (private warning)
              simple_service,
              production=production,
              serve_info=analytics.usage_stats.get_serve_info(),
              serve_kind="http",
              from_server_api=False,
          )
      assert "model_types" in caplog.text
  
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 6 for calling a global function with example usage: test_track_serve_init(mock_usage_event_debugging, mock_do_not_track, mock_post, simple_service, production, caplog) without return types