code: def _ensure_dvc_file(dep, run_dir, project_dir):
      dvc_file_name = dep + ".dvc"
      dest = os.path.join(run_dir, dvc_file_name)
      if os.path.exists(dest):
          return
      src = os.path.join(project_dir, dvc_file_name)
      if not os.path.exists(src):
          raise DvcPullError(
              f"cannot find DvC file {dvc_file_name} in "
              f"{os.path.relpath(project_dir)} (required for 'dvc pull')"
          )
      util.ensure_dir(os.path.dirname(dest))
      util.copyfile(src, dest)
  
imports: import json
  import logging
  import os
  import subprocess
  import yaml
  from guild import util
  from guild import var
label_desc: Use image node_id 31 for calling a global function with example usage: _ensure_dvc_file(dep, run_dir, project_dir) without return types