code: def startQtEventLoop(name, port, authkey, ppid, debug=False):
      if debug:
          import os
  
          cprint.cout(
              debug,
              "[%d] connecting to server at port localhost:%d, authkey=%s..\n"
              % (os.getpid(), port, repr(authkey)),
              -1,
          )
      conn = multiprocessing.connection.Client(
          ("localhost", int(port)), authkey=authkey
      )
      if debug:
          cprint.cout(
              debug,
              "[%d] connected; starting remote proxy.\n" % os.getpid(),
              -1,
          )
      from ..Qt import QtWidgets
  
      app = QtWidgets.QApplication.instance()
      # print app
      if app is None:
          app = mkQApp()
          app.setQuitOnLastWindowClosed(
              False
          )  ## generally we want the event loop to stay open
          ## until it is explicitly closed by the parent process.
  
      global HANDLER
      HANDLER = RemoteQtEventHandler(conn, name, ppid, debug=debug)
      HANDLER.startEventTimer()
      app.exec() if hasattr(app, "exec") else app.exec_()
  
imports: import atexit
  import inspect
  import multiprocessing.connection
  import os
  import signal
  import subprocess
  import sys
  import time
  import pickle
  from ..Qt import QT_LIB, mkQApp
  from ..util import cprint
  from .remoteproxy import ClosedError, LocalObjectProxy, NoResultError, ObjectProxy, RemoteEventHandler
  import threading
label_desc: Use image node_id 2 for calling a global function with example usage: startQtEventLoop(name, port, authkey, ppid, debug) without return types