code: def test_pull(tmp_dir, scm, dvc, git_downstream, exp_stage, use_url):
      from dvc.exceptions import InvalidArgumentError
  
      # fetch and checkout to downstream so both repos start from same commit
      downstream_repo = git_downstream.tmp_dir.scm.gitpython.repo
      fetched = downstream_repo.remote(git_downstream.remote).fetch()
      downstream_repo.git.checkout(fetched)
  
      remote = git_downstream.url if use_url else git_downstream.remote
      downstream_exp = git_downstream.tmp_dir.dvc.experiments
      with pytest.raises(InvalidArgumentError):
          downstream_exp.pull(remote, ["foo"])
  
      results = dvc.experiments.run(
          exp_stage.addressing, params=["foo=1"]
      )
      exp1 = first(results)
      ref_info1 = first(exp_refs_by_rev(scm, exp1))
      results = dvc.experiments.run(
          exp_stage.addressing, params=["foo=2"]
      )
      exp2 = first(results)
      ref_info2 = first(exp_refs_by_rev(scm, exp2))
      results = dvc.experiments.run(
          exp_stage.addressing, params=["foo=3"]
      )
      exp3 = first(results)
      ref_info3 = first(exp_refs_by_rev(scm, exp3))
  
      downstream_exp.pull(
          git_downstream.remote,
          [ref_info1.name, ref_info2.name],
          force=True,
      )
      assert git_downstream.tmp_dir.scm.get_ref(str(ref_info1)) == exp1
      assert git_downstream.tmp_dir.scm.get_ref(str(ref_info2)) == exp2
      assert git_downstream.tmp_dir.scm.get_ref(str(ref_info3)) is None
  
      git_downstream.tmp_dir.scm.remove_ref(str(ref_info1))
  
      downstream_exp.pull(remote, [str(ref_info1)])
      assert git_downstream.tmp_dir.scm.get_ref(str(ref_info1)) == exp1
  
      downstream_exp.pull(remote)
      assert git_downstream.tmp_dir.scm.get_ref(str(ref_info3)) == exp3
  
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 7 for calling a global function with example usage: test_pull(tmp_dir, scm, dvc, git_downstream, exp_stage, use_url) without return types