code: def test_experiments_list(dvc, scm, mocker):
      cli_args = parse_args(
          [
              "experiments",
              "list",
              "origin",
              "--all-commits",
              "-n",
              "-1",
              "--rev",
              "foo",
              "--name-only",
          ]
      )
      assert cli_args.func == CmdExperimentsList
  
      cmd = cli_args.func(cli_args)
      m = mocker.patch("dvc.repo.experiments.ls.ls", return_value={})
  
      assert cmd.run() == 0
  
      m.assert_called_once_with(
          cmd.repo,
          git_remote="origin",
          rev=["foo"],
          all_commits=True,
          num=-1,
      )
  
imports: import pytest
  from dvc.cli import parse_args
  from dvc.commands.experiments.apply import CmdExperimentsApply
  from dvc.commands.experiments.branch import CmdExperimentsBranch
  from dvc.commands.experiments.clean import CmdExperimentsClean
  from dvc.commands.experiments.diff import CmdExperimentsDiff
  from dvc.commands.experiments.ls import CmdExperimentsList
  from dvc.commands.experiments.pull import CmdExperimentsPull
  from dvc.commands.experiments.push import CmdExperimentsPush
  from dvc.commands.experiments.remove import CmdExperimentsRemove
  from dvc.commands.experiments.rename import CmdExperimentsRename
  from dvc.commands.experiments.run import CmdExperimentsRun
  from dvc.commands.experiments.save import CmdExperimentsSave
  from dvc.commands.experiments.show import CmdExperimentsShow
  from dvc.exceptions import InvalidArgumentError
  from .test_repro import common_arguments
label_desc: Use image node_id 8 for calling a global function with example usage: test_experiments_list(dvc, scm, mocker) without return types