class_docstr: TabPy application class for keeping context like settings, state, etc.
code: def run(self):
      application = self._create_tornado_web_app()
  
      init_model_evaluator(
          self.settings, self.tabpy_state, self.python_service
      )
  
      protocol = self.settings[SettingsParameters.TransferProtocol]
      ssl_options = None
      if protocol == "https":
          ssl_options = {
              "certfile": self.settings[
                  SettingsParameters.CertificateFile
              ],
              "keyfile": self.settings[SettingsParameters.KeyFile],
          }
      elif protocol != "http":
          msg = f"Unsupported transfer protocol {protocol}."
          logger.critical(msg)
          raise RuntimeError(msg)
  
      settings = {}
      if self.settings[SettingsParameters.GzipEnabled] is True:
          settings["decompress_request"] = True
  
      application.listen(
          self.settings[SettingsParameters.Port],
          ssl_options=ssl_options,
          max_buffer_size=self.max_request_size,
          max_body_size=self.max_request_size,
          **settings,
      )
  
      logger.info(
          "Web service listening on port "
          f"{str(self.settings[SettingsParameters.Port])}"
      )
  
      if self.settings[SettingsParameters.ArrowEnabled]:
  
          def start_pyarrow():
              self.arrow_server = self._get_arrow_server(self.settings)
              pa.start(self.arrow_server)
  
          try:
              _thread.start_new_thread(start_pyarrow, ())
          except Exception as e:
              logger.critical(f"Failed to start PyArrow server: {e}")
  
      tornado.ioloop.IOLoop.instance().start()
  
imports: import concurrent.futures
  import configparser
  import logging
  import multiprocessing
  import os
  import shutil
  import signal
  import sys
  import _thread
  import tornado
  from tornado.http1connection import HTTP1Connection
  import tabpy
  import tabpy.tabpy_server.app.arrow_server
  from tabpy.tabpy import __version__
  from tabpy.tabpy_server.app.app_parameters import ConfigParameters, SettingsParameters
  from tabpy.tabpy_server.app.util import parse_pwd_file
  from tabpy.tabpy_server.handlers.basic_auth_server_middleware_factory import BasicAuthServerMiddlewareFactory
  from tabpy.tabpy_server.handlers.no_op_auth_handler import NoOpAuthHandler
  from tabpy.tabpy_server.management.state import TabPyState
  from tabpy.tabpy_server.management.util import _get_state_from_file
  from tabpy.tabpy_server.psws.callbacks import init_model_evaluator, init_ps_server
  from tabpy.tabpy_server.psws.python_service import PythonService, PythonServiceHandler
  from tabpy.tabpy_server.handlers import EndpointHandler, EndpointsHandler, EvaluationPlaneHandler, EvaluationPlaneDisabledHandler, QueryPlaneHandler, ServiceInfoHandler, StatusHandler, UploadDestinationHandler
label_desc: Use image node_id 4 for calling the TabPyApp obj's underlying member method code with example usage: obj.run() without return types