code: def _run_output(interp, request, init=None):
      script, rpipe = _captured_script(request)
      with rpipe:
          if init:
              interp.prepare_main(init)
          interp.exec_sync(script)
          return rpipe.read()
  
imports: import contextlib
  import os
  import os.path
  import subprocess
  import sys
  import tempfile
  import threading
  from textwrap import dedent
  import unittest
  from test import support
  from test.support import os_helper
  from test.support import interpreters
label_desc: Use image node_id 3 for calling a global function with example usage: _run_output(interp, request, init) and returns: rpipe