code: def init_ps_server(settings, tabpy_state):
      logger.info("Initializing TabPy Server...")
      existing_pos = tabpy_state.get_endpoints()
      for object_name, obj_info in existing_pos.items():
          try:
              object_version = obj_info["version"]
              get_query_object_path(
                  settings[SettingsParameters.StateFilePath],
                  object_name,
                  object_version,
              )
          except Exception as e:
              logger.error(
                  f"Exception encounted when downloading object: {object_name}"
                  f", error: {e}"
              )
  
file_path: TabPy/tabpy/tabpy_server/psws/callbacks.py
imports: import logging
  from tabpy.tabpy_server.app.app_parameters import SettingsParameters
  from tabpy.tabpy_server.common.messages import LoadObject, DeleteObjects, ListObjects, ObjectList
  from tabpy.tabpy_server.common.endpoint_file_mgr import cleanup_endpoint_files
  from tabpy.tabpy_server.common.util import format_exception
  from tabpy.tabpy_server.management.state import TabPyState, get_query_object_path
  from tabpy.tabpy_server.management import util
  from time import sleep
  from tornado import gen
label_desc: Use image node_id 2 for calling a global function with example usage: init_ps_server(settings, tabpy_state) without return types