code: def _check_replace(merge, args):
      """Checks for replacement of files in a target dir.
  
      Check is disabled if --replace is specified.
      """
      if args.replace or not os.path.exists(merge.target_dir):
          return
      if args.no_replace:
          _fail_if_replacing(merge)
          return
      _try_vcs_status_check_replace(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 10 for calling a global function with example usage: _check_replace(merge, args) without return types