code: def main(
      bento_identifier: str,
      fd: int,
      runner_map: str | None,
      backlog: int,
      working_dir: str | None,
      worker_id: int,
      prometheus_dir: str | None,
      ssl_certfile: str | None,
      ssl_keyfile: str | None,
      ssl_keyfile_password: str | None,
      ssl_version: int | None,
      ssl_cert_reqs: int | None,
      ssl_ca_certs: str | None,
      ssl_ciphers: str | None,
      development_mode: bool,
      timeout: int | None,
  ):
      """
      Start a HTTP api server worker.
      """
      import psutil
  
      import bentoml
      from bentoml._internal.configuration.containers import (
          BentoMLContainer,
      )
      from bentoml._internal.context import component_context
      from bentoml._internal.log import configure_server_logging
  
      component_context.component_type = "api_server"
      component_context.component_index = worker_id
      configure_server_logging()
  
      if worker_id is None:
          # worker ID is not set; this server is running in standalone mode
          # and should not be concerned with the status of its runners
          BentoMLContainer.config.runner_probe.enabled.set(False)
  
      BentoMLContainer.development_mode.set(development_mode)
      if prometheus_dir is not None:
          BentoMLContainer.prometheus_multiproc_dir.set(prometheus_dir)
  
      if runner_map is not None:
          BentoMLContainer.remote_runner_mapping.set(
              json.loads(runner_map)
          )
      if timeout is not None:
          BentoMLContainer.api_server_config.traffic.timeout.set(
              timeout
          )
      svc = bentoml.load(
          bento_identifier,
          working_dir=working_dir,
          standalone_load=True,
      )
  
      # setup context
      component_context.component_name = svc.name
      if svc.tag is None:
          component_context.bento_name = svc.name
          component_context.bento_version = "not available"
      else:
          component_context.bento_name = svc.tag.name
          component_context.bento_version = (
              svc.tag.version or "not available"
          )
  
      uvicorn_options: dict[str, t.Any] = {
          "backlog": backlog,
          "log_config": None,
          "workers": 1,
      }
  
      if ssl_certfile:
          import ssl
  
          uvicorn_options["ssl_certfile"] = ssl_certfile
          if ssl_keyfile:
              uvicorn_options["ssl_keyfile"] = ssl_keyfile
          if ssl_keyfile_password:
              uvicorn_options[
                  "ssl_keyfile_password"
              ] = ssl_keyfile_password
          if ssl_ca_certs:
              uvicorn_options["ssl_ca_certs"] = ssl_ca_certs
  
          if not ssl_version:
              ssl_version = ssl.PROTOCOL_TLS_SERVER
              uvicorn_options["ssl_version"] = ssl_version
          if not ssl_cert_reqs:
              ssl_cert_reqs = ssl.CERT_NONE
              uvicorn_options["ssl_cert_reqs"] = ssl_cert_reqs
          if not ssl_ciphers:
              ssl_ciphers = "TLSv1"
              uvicorn_options["ssl_ciphers"] = ssl_ciphers
  
      if psutil.WINDOWS:
          uvicorn_options["loop"] = "asyncio"
          import asyncio
  
          asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())  # type: ignore
  
      import uvicorn
  
      # skip the uvicorn internal supervisor
      sock = socket.socket(fileno=fd)
      config = uvicorn.Config(svc.asgi_app, **uvicorn_options)
      uvicorn.Server(config).run(sockets=[sock])
  
imports: from __future__ import annotations
  import json
  import socket
  import typing
  import click
label_desc: Use image node_id 1 for calling a global function with example usage: main(bento_identifier, fd, runner_map, backlog, working_dir, worker_id, prometheus_dir, ssl_certfile, ssl_keyfile, ssl_keyfile_password, ssl_version, ssl_cert_reqs, ssl_ca_certs, ssl_ciphers, development_mode, timeout) without return types