code: def setup_stage(tmp_dir, dvc, scm):
      tmp_dir.gen("params.yaml", "foo: 1")
      dvc.run(name="echo-foo", outs=["bar"], cmd="echo foo > bar")
      scm.add(["dvc.yaml", "dvc.lock", ".gitignore", "params.yaml"])
      scm.commit("init")
  
file_path: dvc/tests/func/experiments/test_save.py
imports: import pytest
  from funcy import first
  from dvc.repo.experiments.exceptions import ExperimentExistsError, InvalidArgumentError
  from dvc.repo.experiments.utils import exp_refs_by_rev
  from dvc.scm import resolve_rev
label_desc: Use image node_id 1 for calling a global function with example usage: setup_stage(tmp_dir, dvc, scm) without return types