code: def __init__(
      self,
      servable: str | Bento | Tag | Service,
      serve_cmd: str,
      reload: bool,
      production: bool,
      env: t.Literal["conda"] | None,
      host: str,
      port: int,
      working_dir: str | None,
      api_workers: int | None,
      backlog: int,
      bento: str | Bento | Tag | Service | None = None,
      timeout: float = 10,
  ):
      if bento is not None:
          if servable is None:  # type: ignore  # dealing with backwards compatibility, where a user has set bento argument manually.
              warn(
                  f"serving using the 'bento' argument is deprecated, either remove it as a kwarg or pass '{bento}' as the first positional argument",
                  DeprecationWarning,
                  stacklevel=2,
              )
              servable = bento
          else:
              raise InvalidArgument(
                  "Cannot use both 'bento' and 'servable' arguments; as 'bento' is deprecated, set 'servable' instead."
              )
  
      self.servable = servable
      # backward compatibility
      self.bento = servable
  
      if isinstance(servable, Bento):
          bento_str = str(servable.tag)
      elif isinstance(servable, Tag):
          bento_str = str(servable)
      elif isinstance(servable, Service):
          if not servable.is_service_importable():
              raise UnservableException(
                  "Cannot use 'bentoml.Service' as a server if it is defined in interactive session or Jupyter Notebooks."
              )
          bento_str, working_dir = servable.get_service_import_origin()
      else:
          bento_str = servable
  
      args: list[str] = [
          sys.executable,
          "-m",
          "bentoml",
          serve_cmd,
          bento_str,
          "--host",
          host,
          "--port",
          str(port),
          "--backlog",
          str(backlog),
      ]
  
      if not production:
          args.append("--development")
      if reload:
          args.append("--reload")
      if env:
          args.extend(["--env", env])
  
      if api_workers is not None:
          args.extend(["--api-workers", str(api_workers)])
      if working_dir is not None:
          args.extend(["--working-dir", str(working_dir)])
  
      self.args = args
      self.host = "127.0.0.1" if host == "0.0.0.0" else host
      self.port = port
      self.timeout = timeout
  
imports: from __future__ import annotations
  import logging
  import os
  import signal
  import subprocess
  import sys
  import textwrap
  import typing
  from abc import ABC
  from abc import abstractmethod
  from typing import TYPE_CHECKING
  from warnings import warn
  from simple_di import Provide
  from simple_di import inject
  from ._internal.bento import Bento
  from ._internal.client import Client
  from ._internal.client.grpc import GrpcClient
  from ._internal.client.http import HTTPClient
  from ._internal.configuration.containers import BentoMLContainer
  from ._internal.service import Service
  from ._internal.tag import Tag
  from ._internal.utils.analytics.usage_stats import BENTOML_SERVE_FROM_SERVER_API
  from .exceptions import InvalidArgument
  from .exceptions import ServerStateException
  from .exceptions import UnservableException
label_desc: Use image node_id 1 to create a new Server object from inherited base classes: ABC, t.Generic with example: obj = Server(servable, serve_cmd, reload, production, env, host, port, working_dir, api_workers, backlog, bento, timeout)