code: def setup():
      error.RemoteError = RemoteErrorWithTB
  
      cluster_dir = os.path.join(get_ipython_dir(), "profile_iptest")
      engine_json = os.path.join(
          cluster_dir, "security", "ipcontroller-engine.json"
      )
      client_json = os.path.join(
          cluster_dir, "security", "ipcontroller-client.json"
      )
      for json in (engine_json, client_json):
          if os.path.exists(json):
              os.remove(json)
  
      cp = TestProcessLauncher()
      cp.cmd_and_args = ipcontroller_cmd_argv + [
          "--profile=iptest",
          "--log-level=10",
          "--ping=250",
          "--dictdb",
      ]
      if os.environ.get("IPP_CONTROLLER_IP"):
          cp.cmd_and_args.append(
              f"--ip={os.environ['IPP_CONTROLLER_IP']}"
          )
      cp.start()
      launchers.append(cp)
      tic = time.time()
      while not os.path.exists(engine_json) or not os.path.exists(
          client_json
      ):
          if cp.poll() is not None:
              raise RuntimeError(
                  "The test controller exited with status %s"
                  % cp.poll()
              )
          elif time.time() - tic > 15:
              raise RuntimeError(
                  "Timeout waiting for the test controller to start."
              )
          time.sleep(0.1)
      add_engines(1)
  
file_path: ipyparallel/ipyparallel/tests/__init__.py
imports: import asyncio
  import os
  import time
  from subprocess import Popen
  from IPython.paths import get_ipython_dir
  from ipyparallel import Client, error
  from ipyparallel.cluster.launcher import SIGKILL, LocalProcessLauncher, ProcessStateError, ipcontroller_cmd_argv, ipengine_cmd_argv
label_desc: Use image node_id 1 for calling a global function with example usage: setup() without return types