code: def add_parser(experiments_subparsers, parent_parser):
      from . import add_rev_selection_flags
  
      EXPERIMENTS_LIST_HELP = "List local and remote experiments."
      experiments_list_parser = experiments_subparsers.add_parser(
          "list",
          aliases=["ls"],
          parents=[parent_parser],
          description=append_doc_link(
              EXPERIMENTS_LIST_HELP, "exp/list"
          ),
          help=EXPERIMENTS_LIST_HELP,
          formatter_class=formatter.RawDescriptionHelpFormatter,
      )
      add_rev_selection_flags(experiments_list_parser, "List")
      display_group = (
          experiments_list_parser.add_mutually_exclusive_group()
      )
      display_group.add_argument(
          "--name-only",
          "--names-only",
          action="store_true",
          help="Only output experiment names (without SHAs or parent commits).",
      )
      display_group.add_argument(
          "--sha-only",
          "--shas-only",
          action="store_true",
          help="Only output experiment commit SHAs (without names or parent commits).",
      )
      experiments_list_parser.add_argument(
          "git_remote",
          nargs="?",
          default=None,
          help=(
              "Optional Git remote name or Git URL. "
              "If provided, experiments from the specified Git repository "
              " will be listed instead of local ones."
          ),
          metavar="<git_remote>",
      )
      experiments_list_parser.set_defaults(func=CmdExperimentsList)
  
file_path: dvc/dvc/commands/experiments/ls.py
imports: from dvc.cli import formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.exceptions import InvalidArgumentError
  from dvc.log import logger
  from dvc.ui import ui
label_desc: Use image node_id 1 for calling a global function with example usage: add_parser(experiments_subparsers, parent_parser) without return types