code: def test_pull_ambiguous_name(
      tmp_dir, scm, dvc, git_downstream, exp_stage
  ):
      from dvc.exceptions import InvalidArgumentError
  
      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))
  
      remote = git_downstream.remote
      downstream_exp = git_downstream.tmp_dir.dvc.experiments
      with pytest.raises(InvalidArgumentError):
          downstream_exp.pull(remote, ["foo"])
  
      downstream_exp.pull(remote, [str(ref_info_b)])
      assert (
          git_downstream.tmp_dir.scm.get_ref(str(ref_info_b)) == exp_b
      )
  
      with git_downstream.tmp_dir.scm.detach_head(
          ref_info_a.baseline_sha
      ):
          downstream_exp.pull(remote, ["foo"])
      assert (
          git_downstream.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 11 for calling a global function with example usage: test_pull_ambiguous_name(tmp_dir, scm, dvc, git_downstream, exp_stage) without return types