code: def check_output_fn(capsys):
      def check_fn(exp_summary, exp_history):
          captured = capsys.readouterr()
          lines = captured.err.splitlines()
          # for l in captured.err.splitlines():
          #     print("ERR =", l)
          # for l in captured.out.splitlines():
          #     print("OUT =", l)
          lines = [
              remove_prefix(line, LINE_PREFIX).strip() for line in lines
          ]
  
          footer_end = next(
              iter(
                  [
                      line
                      for line in lines
                      if line.startswith(FOOTER_END_PREFIX)
                  ]
              )
          )
          history_end = RUN_SUMMARY if exp_summary else footer_end
          check_keys(lines, RUN_HISTORY, history_end, exp_history)
          check_keys(lines, RUN_SUMMARY, footer_end, exp_summary)
  
      yield check_fn
  
file_path: wandb/tests/pytest_tests/system_tests/test_core/test_footer.py
imports: import re
  import numpy
  import pytest
  import wandb
label_desc: Use image node_id 3 for calling a global function with example usage: check_output_fn(capsys) without return types