code: def spawn_python(
      *args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kw
  ):
      """Run a Python subprocess with the given arguments.
  
      kw is extra keyword args to pass to subprocess.Popen. Returns a Popen
      object.
      """
      cmd_line = [sys.executable]
      if not interpreter_requires_environment():
          cmd_line.append("-E")
      cmd_line.extend(args)
      # Under Fedora (?), GNU readline can output junk on stderr when initialized,
      # depending on the TERM setting.  Setting TERM=vt100 is supposed to disable
      # that.  References:
      # - http://reinout.vanrees.org/weblog/2009/08/14/readline-invisible-character-hack.html
      # - http://stackoverflow.com/questions/15760712/python-readline-module-prints-escape-character-during-import
      # - http://lists.gnu.org/archive/html/bug-readline/2007-08/msg00004.html
      env = kw.setdefault("env", dict(os.environ))
      env["TERM"] = "vt100"
      return subprocess.Popen(
          cmd_line,
          stdin=subprocess.PIPE,
          stdout=stdout,
          stderr=stderr,
          **kw,
      )
  
imports: import collections
  import importlib
  import sys
  import os
  import os.path
  import subprocess
  import py_compile
  from importlib.util import source_from_cache
  from test import support
  from test.support.import_helper import make_legacy_pyc
label_desc: Use image node_id 6 for calling a global function with example usage: spawn_python() and returns: subprocess