code: def test_list_remote(
      tmp_dir, scm, dvc, git_downstream, exp_stage, use_url
  ):
      baseline_old = scm.get_rev()
      results = dvc.experiments.run(
          exp_stage.addressing, params=["foo=2"]
      )
      exp_a = first(results)
      ref_info_a = first(exp_refs_by_rev(scm, exp_a))
  
      results = dvc.experiments.run(
          exp_stage.addressing, params=["foo=3"]
      )
      exp_b = first(results)
      ref_info_b = first(exp_refs_by_rev(scm, exp_b))
  
      tmp_dir.scm_gen("new", "new", commit="new")
      baseline_new = scm.get_rev()
  
      results = dvc.experiments.run(
          exp_stage.addressing, params=["foo=4"]
      )
      exp_c = first(results)
      ref_info_c = first(exp_refs_by_rev(scm, exp_c))
  
      remote = git_downstream.url if use_url else git_downstream.remote
  
      assert git_downstream.tmp_dir.scm.get_ref("HEAD") != scm.get_ref(
          "HEAD"
      )
      downstream_exp = git_downstream.tmp_dir.dvc.experiments
      assert downstream_exp.ls(git_remote=remote) == {}
  
      git_downstream.tmp_dir.scm.fetch_refspecs(
          remote, ["master:master"]
      )
      exp_list = downstream_exp.ls(rev=baseline_old, git_remote=remote)
      assert {key: set(val) for key, val in exp_list.items()} == {
          baseline_old: {
              (ref_info_a.name, None),
              (ref_info_b.name, None),
          }
      }
  
      exp_list = downstream_exp.ls(all_commits=True, git_remote=remote)
      assert {key: set(val) for key, val in exp_list.items()} == {
          baseline_old: {
              (ref_info_a.name, None),
              (ref_info_b.name, None),
          },
          baseline_new: {(ref_info_c.name, None)},
      }
  
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 6 for calling a global function with example usage: test_list_remote(tmp_dir, scm, dvc, git_downstream, exp_stage, use_url) without return types