code: def _check_path(self, path, run):
      rel_path = os.path.relpath(path, run.path)
      if self.compare_to:
          compare_to = os.path.join(
              run.path, _apply_env_to_path(self.compare_to)
          )
          log.info(
              "comparing run %s file %s to %s",
              run.id,
              rel_path,
              compare_to,
          )
          _compare_files(path, compare_to)
      if self.pattern_re:
          log.info(
              "checking run %s file %s for %r",
              run.id,
              rel_path,
              self.pattern,
          )
          out = _read(path)
          if not self.pattern_re.search(out):
              raise Failed(
                  f"could not find pattern {self.pattern!r} in "
                  f"run {run.id} file {rel_path}"
              )
  
imports: import difflib
  import glob
  import logging
  import os
  import re
  from guild import util
label_desc: Use image node_id 3 for calling the FileCheck obj's underlying member method code with example usage: obj._check_path(path, run) without return types