code: def _bentoml_serve_from_server_api() -> bool:
      return (
          os.environ.get(
              BENTOML_SERVE_FROM_SERVER_API, str(False)
          ).lower()
          == "true"
      )
  
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 1 for calling a global function with example usage: _bentoml_serve_from_server_api() and returns: unknown