code: def run(self):
      name_only = self.args.name_only
      sha_only = self.args.sha_only
      git_remote = self.args.git_remote
      if sha_only and git_remote:
          raise InvalidArgumentError(
              "--sha-only not supported with git_remote."
          )
      exps = self.repo.experiments.ls(
          all_commits=self.args.all_commits,
          rev=self.args.rev,
          num=self.args.num,
          git_remote=git_remote,
      )
  
      from dvc.repo.experiments.utils import describe
      from dvc.scm import Git
  
      if name_only or sha_only:
          names = {}
      else:
          assert isinstance(self.repo.scm, Git)
          names = describe(
              self.repo.scm,
              (baseline for baseline in exps),
              logger=logger,
          )
  
      for baseline in exps:
          if not (name_only or sha_only):
              name = names.get(baseline) or baseline[:7]
              ui.write(f"{name}:")
          for exp_name, rev in exps[baseline]:
              if name_only:
                  ui.write(exp_name)
              elif sha_only:
                  ui.write(rev)
              elif rev:
                  ui.write(f"\t{rev[:7]} [{exp_name}]")
              else:
                  ui.write(f"\t{exp_name}")
  
      return 0
  
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 the CmdExperimentsList obj's underlying member method code with example usage: obj.run() and returns: int