code: def pytest_hack(runner_result):
      """This is an ugly hack to get the unittest suites to play nicely with
      pytest. Otherwise failed tests are not reported by pytest for some reason.
  
      Long-term, these model tests should be adapted to pytest.
      """
      if not runner_result.wasSuccessful():
          print("SUITE UNSUCCESSFUL:", file=sys.stderr)
          for fails in runner_result.failures:
              print(fails, file=sys.stderr)
          assert runner_result.wasSuccessful()
  
file_path: deepspeed/tests/model/run_sanity_check.py
imports: import sys
  import unittest
  import Megatron_GPT2
  import BingBertSquad
label_desc: Use image node_id 1 for calling a global function with example usage: pytest_hack(runner_result) without return types