class_docstr: TabPy application class for keeping context like settings, state, etc.
code: def _validate_cert_key_state(msg, cert_valid, key_valid):
      cert_and_key_param = (
          f"{ConfigParameters.TABPY_CERTIFICATE_FILE} and "
          f"{ConfigParameters.TABPY_KEY_FILE}"
      )
      https_error = "Error using HTTPS: "
      err = None
      if not cert_valid and not key_valid:
          err = https_error + msg.format(cert_and_key_param)
      elif not cert_valid:
          err = https_error + msg.format(
              ConfigParameters.TABPY_CERTIFICATE_FILE
          )
      elif not key_valid:
          err = https_error + msg.format(
              ConfigParameters.TABPY_KEY_FILE
          )
  
      if err is not None:
          logger.critical(err)
          raise RuntimeError(err)
  
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 9 for calling the TabPyApp obj's underlying member method code with example usage: obj._validate_cert_key_state(msg, cert_valid, key_valid) without return types