code: def run_head(tmp_dir, head_script, dvc):
      script = os.path.abspath(tmp_dir / "head.py")
  
      def run(*args, **run_kwargs):
          return dvc.run(
              **{
                  "cmd": "python {} {}".format(script, " ".join(args)),
                  "outs": [dep + "-1" for dep in args],
                  "deps": list(args),
                  **run_kwargs,
              }
          )
  
      return run
  
file_path: dvc/tests/dir_helpers.py
imports: import os
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: run_head(tmp_dir, head_script, dvc) and returns: run, dvc