class_docstr: TabPy application class for keeping context like settings, state, etc.
code: def _set_parameter(
      self,
      parser,
      settings_key,
      config_key,
      default_val,
      parse_function,
  ):
      key_is_set = False
  
      if (
          config_key is not None
          and parser.has_section("TabPy")
          and parser.has_option("TabPy", config_key)
      ):
          if parse_function is None:
              parse_function = parser.get
          self.settings[settings_key] = parse_function(
              "TabPy", config_key
          )
          key_is_set = True
          logger.debug(
              f"Parameter {settings_key} set to "
              f'"{self.settings[settings_key]}" '
              "from config file or environment variable"
          )
  
      if not key_is_set and default_val is not None:
          self.settings[settings_key] = default_val
          key_is_set = True
          logger.debug(
              f"Parameter {settings_key} set to "
              f'"{self.settings[settings_key]}" '
              "from default value"
          )
  
      if not key_is_set:
          logger.debug(f"Parameter {settings_key} is not set")
  
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 6 for calling the TabPyApp obj's underlying member method code with example usage: obj._set_parameter(parser, settings_key, config_key, default_val, parse_function) without return types