code: def commit_exp_ref(
      tmp_dir, scm, file="foo", contents="foo", name="foo"
  ):
      tmp_dir.scm_gen(file, contents, commit="init")
      rev = scm.get_rev()
      ref = f"{EXPS_NAMESPACE}/ab/c123/{name}"
      scm.gitpython.set_ref(ref, rev)
      return ref, rev
  
file_path: dvc/tests/unit/repo/experiments/test_utils.py
imports: import re
  import pytest
  from dvc.exceptions import InvalidArgumentError
  from dvc.repo.experiments.refs import EXPS_NAMESPACE, ExpRefInfo
  from dvc.repo.experiments.utils import check_ref_format, gen_random_name, resolve_name, to_studio_params
label_desc: Use image node_id 1 for calling a global function with example usage: commit_exp_ref(tmp_dir, scm, file, contents, name) and returns: ref,  rev