code: def _get_run_on_threads(
      protocol: type[WitlessProtocol], iterate: bool
  ) -> tuple[Thread, Thread, list]:
      runner = _runner_with_protocol(protocol)
  
      args: tuple[ThreadedRunner, bool, list] = (runner, iterate, [])
      thread_1 = threading.Thread(target=_run_on, args=args)
      thread_2 = threading.Thread(target=_run_on, args=args)
  
      return thread_1, thread_2, args[2]
  
imports: from __future__ import annotations
  import random
  import threading
  import time
  from threading import Thread
  from datalad.tests.utils_pytest import assert_raises
  from ..coreprotocols import StdOutCapture
  from ..nonasyncrunner import ThreadedRunner
  from ..protocol import GeneratorMixIn, WitlessProtocol
  from .utils import py2cmd
label_desc: Use image node_id 3 for calling a global function with example usage: _get_run_on_threads(protocol, iterate) and returns: thread_1,  thread_2,  args