code: def main():
      global service
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "-p",
          "--port",
          type=int,
          help="What port to listen on",
          default=1959,
      )
      parser.add_argument(
          "--ssl-key-file", type=str, help="Path to SSL key file"
      )
      parser.add_argument(
          "--ssl-cert-file", type=str, help="Path to SSL cert file"
      )
      parser.add_argument(
          "-b",
          "--base-path",
          help="What directory has credentials, etc.",
          default="prod_env",
      )
      parser.add_argument(
          "-w",
          "--workers",
          type=int,
          help="Number of worker processes to handle requests",
          default=8,
      )
      parser.add_argument(
          "-t",
          "--timeout",
          type=int,
          help="Request timeout in seconds",
          default=5 * 60,
      )
      parser.add_argument(
          "--mongo-uri",
          type=str,
          help="If non-empty, the URL of the MongoDB database that will be used for caching instead of SQLite",
          default="",
      )
      args = parser.parse_args()
  
      service = ServerService(
          base_path=args.base_path, mongo_uri=args.mongo_uri
      )
  
      gunicorn_args = {
          "workers": args.workers,
          "timeout": args.timeout,
          "limit_request_line": 0,  # Controls the maximum size of HTTP request line in bytes. 0 = unlimited.
      }
      if args.ssl_key_file and args.ssl_cert_file:
          gunicorn_args["keyfile"] = args.ssl_key_file
          gunicorn_args["certfile"] = args.ssl_cert_file
  
      # Clear arguments before running gunicorn as it also uses argparse
      sys.argv = [sys.argv[0]]
      app.run(
          host="0.0.0.0",
          port=args.port,
          server="gunicorn",
          **gunicorn_args,
      )
  
imports: from urllib.parse import unquote_plus
  import argparse
  import dataclasses
  import json
  import os
  import sys
  import time
  from dacite import from_dict
  import bottle
  from helm.common.authentication import Authentication
  from helm.common.hierarchical_logger import hlog
  from helm.common.request import Request
  from helm.common.perspective_api_request import PerspectiveAPIRequest
  from helm.common.tokenization_request import TokenizationRequest, DecodeRequest
  from .accounts import Account
  from .services.server_service import ServerService
  from .query import Query
label_desc: Use image node_id 17 for calling a global function with example usage: main() without return types