code: def _check_vcs_status(vcs_status, merge):
      """Checks for replacement status in a VCS managed dir.
  
      `vcs_status` is the result of `vcs_util.status()` for the target
      directory.
  
      The rules applied are as follows:
  
      - If there are any non-source to be replaced, treats all replaced
        files as a non-source replace and uses the same message as if
        the project was not VCS managed.
  
      - If all of the files to be replaced are unstaged source code
        files, shows a message asking user to stage the changes or to
        override with the '--replace' option.
  
      - If all of the files to be replaced are staged source code
        files, does nothing. This allows the merge to continue under the
        assumption that any replaced files can be recovered from the
        VCS.
      """
      all_source = set(vcs_util.ls_files(merge.target_dir))
      unstaged = _unstaged_source(vcs_status, all_source)
      unstaged_replacing = _unstaged_replacing(unstaged, merge)
      all_replacing = _merge_replacing_files(merge)
      nonsource_replacing = all_replacing - all_source
      if nonsource_replacing:
          _replacing_error(all_replacing, merge)
      elif unstaged_replacing:
          _replace_unstaged_error(unstaged_replacing, merge)
  
imports: import os
  from guild import cli
  from guild import cmd_impl_support
  from guild import config
  from guild import exit_code
  from guild import run_merge
  from guild import run_util
  from guild import util
  from guild import vcs_util
  from .None import runs_impl
label_desc: Use image node_id 15 for calling a global function with example usage: _check_vcs_status(vcs_status, merge) without return types