code: def _checked_cwd_run_pkg_type(run, ctx):
      if run.opref.pkg_type not in ("guildfile", "script"):
          cli.error(
              f"run {run.id} does not originate from a project - cannot merge to the "
              "current directory by default\nUse --target-dir to skip this "
              f"check or try '{ctx.command_path} --help' for more information."
          )
  
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 7 for calling a global function with example usage: _checked_cwd_run_pkg_type(run, ctx) without return types