code: def RemoveReportHeaderAndFooter(output):
      """Removes Google Test result report's header and footer from the output."""
  
      output = re.sub(r".*gtest_main.*\n", "", output)
      output = re.sub(r"\[.*\d+ tests.*\n", "", output)
      output = re.sub(r"\[.* test environment .*\n", "", output)
      output = re.sub(r"\[=+\] \d+ tests .* ran.*", "", output)
      output = re.sub(r".* FAILED TESTS\n", "", output)
      return output
  
file_path: googletest/googlemock/test/gmock_output_test.py
imports: from io import open
  import os
  import re
  import sys
  from googlemock.test import gmock_test_utils
label_desc: Use image node_id 2 for calling a global function with example usage: RemoveReportHeaderAndFooter(output) and returns: output