code: def _compare(actual, expected, actual_src, expected_src):
      a = re.split(r"\n\r?", expected)
      b = re.split(r"\n\r?", actual)
      fromfile = expected_src
      tofile = actual_src
      diff = list(difflib.unified_diff(a, b, fromfile, tofile))
      if diff:
          log.error("\n".join(diff))
          raise Failed(
              "unexpected file contents - see above for details"
          )
  
imports: import difflib
  import glob
  import logging
  import os
  import re
  from guild import util
label_desc: Use image node_id 3 for calling a global function with example usage: _compare(actual, expected, actual_src, expected_src) without return types