code: def patch_doctest_check_output(monkeypatch):
      # FIXME: remove once test output matches docs
      base_check_output = doctest.OutputChecker.check_output
  
      def patched_check_output(self, want, got, optionflags):
          return (
              (not want)
              or (want.strip() == "None")
              or base_check_output(
                  self,
                  want,
                  got,
                  optionflags | doctest.NORMALIZE_WHITESPACE,
              )
          )
  
      monkeypatch.setattr(
          "doctest.OutputChecker.check_output", patched_check_output
      )
      yield
      monkeypatch.undo()
  
imports: import doctest
  import os
  import pytest
  from hailtop import batch
label_desc: Use image node_id 1 for calling a global function with example usage: patch_doctest_check_output(monkeypatch) and returns: unknown