code: def test_exp_save(tmp_dir, dvc, scm, name):
      setup_stage(tmp_dir, dvc, scm)
      baseline = scm.get_rev()
  
      exp = dvc.experiments.save(name=name)
      ref_info = first(exp_refs_by_rev(scm, exp))
      assert ref_info
      assert ref_info.baseline_sha == baseline
  
      exp_name = name if name else ref_info.name
      assert dvc.experiments.get_exact_name([exp])[exp] == exp_name
      assert resolve_rev(scm, exp_name) == exp
  
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 3 for calling a global function with example usage: test_exp_save(tmp_dir, dvc, scm, name) without return types