code: def RunAndReturnOutput(
      test_suite=None, fail_fast=None, run_disabled=False
  ):
      """Runs the test program and returns its output."""
  
      args = []
      xml_path = os.path.join(
          gtest_test_utils.GetTempDir(), ".GTestFailFastUnitTest.xml"
      )
      args += ["--gtest_output=xml:" + xml_path]
      if fail_fast is not None:
          if isinstance(fail_fast, str):
              args += ["--%s=%s" % (FAIL_FAST_FLAG, fail_fast)]
          elif fail_fast:
              args += ["--%s" % FAIL_FAST_FLAG]
          else:
              args += ["--no%s" % FAIL_FAST_FLAG]
      if test_suite:
          args += ["--%s=%s.*" % (FILTER_FLAG, test_suite)]
      if run_disabled:
          args += ["--%s" % RUN_DISABLED_FLAG]
      txt_out = gtest_test_utils.Subprocess(
          [COMMAND] + args, env=environ
      ).output
      with open(xml_path) as xml_file:
          return txt_out, xml_file.read()
  
imports: import os
  from googletest.test import gtest_test_utils
label_desc: Use image node_id 2 for calling a global function with example usage: RunAndReturnOutput(test_suite, fail_fast, run_disabled) and returns: txt_out,  xml_file