code: def mpiexec_execute(
      script, mpiexec_params, params, timeout_seconds=TIMEOUT_SECONDS
  ):
      cmd = ["mpiexec"] + mpiexec_params + ["python", script] + params
      p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
      if sys.version_info[0] < 3:
          out = p.communicate()[0]
      else:
          try:
              out = p.communicate(timeout=timeout_seconds)[
                  0
              ]  # in case we have a hang
          except subprocess.TimeoutExpired:
              os.kill(p.pid, signal.CTRL_C_EVENT)
              raise RuntimeError("Timeout in mpiexec, possibly hang")
      str_out = out.decode(sys.getdefaultencoding())
      return str_out
  
imports: import argparse
  import collections
  import os
  import pickle
  import pytest
  import re
  import signal
  import subprocess
  import sys
  import time
  import numpy
  import cntk
label_desc: Use image node_id 1 for calling a global function with example usage: mpiexec_execute(script, mpiexec_params, params, timeout_seconds) and returns: str_out