code: def run(self):
      from dvc.repo import Repo
  
      try:
          entries = Repo.ls(
              self.args.url,
              self.args.path,
              rev=self.args.rev,
              recursive=self.args.recursive,
              dvc_only=self.args.dvc_only,
              config=self.args.config,
              remote=self.args.remote,
              remote_config=self.args.remote_config,
          )
          if self.args.json:
              ui.write_json(entries)
          elif entries:
              show_entries(
                  entries, with_color=True, with_size=self.args.size
              )
          return 0
      except DvcException:
          logger.exception("failed to list '%s'", self.args.url)
          return 1
  
file_path: dvc/dvc/commands/ls/__init__.py
imports: from dvc.cli import completion, formatter
  from dvc.cli.command import CmdBaseNoRepo
  from dvc.cli.utils import DictAction, append_doc_link
  from dvc.commands.ls.ls_colors import LsColors
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from dvc.ui import ui
label_desc: Use image node_id 1 for calling the CmdList obj's underlying member method code with example usage: obj.run() and returns: int, int