code: def _track_serve_init(
      svc: Service,
      production: bool,
      serve_kind: str,
      from_server_api: bool,
      serve_info: ServeInfo = Provide[BentoMLContainer.serve_info],
  ):
      if svc.bento is not None:
          bento = svc.bento
          event_properties = ServeInitEvent(
              serve_id=serve_info.serve_id,
              serve_from_bento=True,
              serve_from_server_api=from_server_api,
              production=production,
              serve_kind=serve_kind,
              bento_creation_timestamp=bento.info.creation_time,
              num_of_models=len(bento.info.models),
              num_of_runners=len(svc.runners),
              num_of_apis=len(bento.info.apis),
              model_types=[m.module for m in bento.info.models],
              runnable_types=[
                  r.runnable_type for r in bento.info.runners
              ],
              api_input_types=[
                  api.input_type for api in bento.info.apis
              ],
              api_output_types=[
                  api.output_type for api in bento.info.apis
              ],
          )
      else:
          event_properties = ServeInitEvent(
              serve_id=serve_info.serve_id,
              serve_from_bento=False,
              serve_from_server_api=from_server_api,
              production=production,
              serve_kind=serve_kind,
              bento_creation_timestamp=None,
              num_of_models=len(
                  set(
                      svc.models
                      + [
                          model
                          for runner in svc.runners
                          for model in runner.models
                      ]
                  )
              ),
              num_of_runners=len(svc.runners),
              num_of_apis=len(svc.apis.keys()),
              runnable_types=[
                  r.runnable_class.__name__ for r in svc.runners
              ],
              api_input_types=[
                  api.input.__class__.__name__
                  for api in svc.apis.values()
              ],
              api_output_types=[
                  api.output.__class__.__name__
                  for api in svc.apis.values()
              ],
          )
  
      track(event_properties)
  
imports: from __future__ import annotations
  import contextlib
  import logging
  import os
  import secrets
  import threading
  import typing
  from datetime import datetime
  from datetime import timezone
  from functools import lru_cache
  from functools import wraps
  from typing import TYPE_CHECKING
  import attr
  import httpx
  from simple_di import Provide
  from simple_di import inject
  from ...configuration import get_debug_mode
  from ...configuration.containers import BentoMLContainer
  from ...utils import compose
  from .schemas import CommonProperties
  from .schemas import EventMeta
  from .schemas import ServeInitEvent
  from .schemas import ServeUpdateEvent
  from .schemas import TrackingPayload
label_desc: Use image node_id 8 for calling a global function with example usage: _track_serve_init(svc, production, serve_kind, from_server_api, serve_info) without return types