code: def test_push_ambiguous_name(
      tmp_dir, scm, dvc, git_upstream, exp_stage
  ):
      from dvc.exceptions import InvalidArgumentError
  
      remote = git_upstream.remote
  
      results = dvc.experiments.run(
          exp_stage.addressing, params=["foo=2"], name="foo"
      )
      exp_a = first(results)
      ref_info_a = first(exp_refs_by_rev(scm, exp_a))
  
      tmp_dir.scm_gen("new", "new", commit="new")
      results = dvc.experiments.run(
          exp_stage.addressing, params=["foo=3"], name="foo"
      )
      exp_b = first(results)
      ref_info_b = first(exp_refs_by_rev(scm, exp_b))
  
      dvc.experiments.push(remote, ["foo"])
      assert git_upstream.tmp_dir.scm.get_ref(str(ref_info_b)) == exp_b
  
      tmp_dir.scm_gen("new", "new 2", commit="new 2")
  
      with pytest.raises(InvalidArgumentError):
          dvc.experiments.push(remote, ["foo"])
  
      dvc.experiments.push(remote, [str(ref_info_a)])
      assert git_upstream.tmp_dir.scm.get_ref(str(ref_info_a)) == exp_a
  
file_path: dvc/tests/func/experiments/test_remote.py
imports: import logging
  import pytest
  from funcy import first
  from dvc.repo.experiments.utils import exp_refs_by_rev
label_desc: Use image node_id 5 for calling a global function with example usage: test_push_ambiguous_name(tmp_dir, scm, dvc, git_upstream, exp_stage) without return types