code: def _try_git_status(dir, ignored):
      ignored_args = ["--ignored=matching"] if ignored else []
      cmd = (
          [_git_exe.read(), "status", "--short", "--renames"]
          + ignored_args
          + ["."]
      )
      try:
          out = subprocess.check_output(
              cmd, cwd=dir, stderr=subprocess.STDOUT
          )
      except subprocess.CalledProcessError as e:
          if log.getEffectiveLevel() <= logging.DEBUG:
              log.error("error listing git files (%i)", e.returncode)
              log.error(e.stdout)
          raise util.TryFailed() from None
      else:
          return _parse_git_status(out)
  
imports: import collections
  import logging
  import re
  import os
  import subprocess
  from guild import config
  from guild import file_util
  from guild import util
  from guild.file_util import FileSelectRule
label_desc: Use image node_id 11 for calling a global function with example usage: _try_git_status(dir, ignored) and returns: _parse_git_status