code: def execute(command, env=None):
      """
      Executes the command and returns stdout and stderr as a string, together with the exit code.
      :param command: command to execute
      :param env: environment variables to use
      :return: (output, exit code) or None on failure
      """
      output = io.StringIO()
      try:
          exit_code = safe_shell_exec.execute(
              command, env=env, stdout=output, stderr=output
          )
          output_msg = output.getvalue()
      except Exception:
          print(traceback.format_exc(), file=sys.stderr)
          return None
      finally:
          output.close()
  
      return output_msg, exit_code
  
imports: import io
  import sys
  import traceback
  from horovod.runner.common.util import safe_shell_exec
label_desc: Use image node_id 1 for calling a global function with example usage: execute(command, env) and returns: output_msg,  exit_code, None