code: def test_remove_all_queued_experiments(tmp_dir, scm, dvc, exp_stage):
      queue_length = 3
      for i in range(queue_length):
          dvc.experiments.run(
              exp_stage.addressing, params=[f"foo={i}"], queue=True
          )
  
      results = dvc.experiments.run(
          exp_stage.addressing, params=[f"foo={queue_length}"]
      )
      ref_info = first(exp_refs_by_rev(scm, first(results)))
  
      assert len(dvc.experiments.stash_revs) == queue_length
      assert len(dvc.experiments.remove(queue=True)) == queue_length
      assert len(dvc.experiments.stash_revs) == 0
      assert scm.get_ref(str(ref_info)) is not None
  
file_path: dvc/tests/func/experiments/test_remove.py
imports: import pytest
  from funcy import first
  from dvc.exceptions import InvalidArgumentError
  from dvc.repo.experiments.exceptions import UnresolvedExpNamesError
  from dvc.repo.experiments.utils import exp_refs_by_rev
label_desc: Use image node_id 2 for calling a global function with example usage: test_remove_all_queued_experiments(tmp_dir, scm, dvc, exp_stage) without return types