code: def ls(
      url: str,
      path: Optional[str] = None,
      rev: Optional[str] = None,
      recursive: Optional[bool] = None,
      dvc_only: bool = False,
      config: Union[None, Dict[str, Any], str] = None,
      remote: Optional[str] = None,
      remote_config: Optional[dict] = None,
  ):
      """Methods for getting files and outputs for the repo.
  
      Args:
          url (str): the repo url
          path (str, optional): relative path into the repo
          rev (str, optional): SHA commit, branch or tag name
          recursive (bool, optional): recursively walk the repo
          dvc_only (bool, optional): show only DVC-artifacts
          config (str, optional): path to config file
          remote (str, optional): remote name to set as a default remote in the repo
          remote_config (str, dict): remote config to merge with a remote in the repo
  
      Returns:
          list of `entry`
  
      Notes:
          `entry` is a dictionary with structure
          {
              "path": str,
              "isout": bool,
              "isdir": bool,
              "isexec": bool,
          }
      """
      from dvc.config import Config
  
      from . import Repo
  
      if config and not isinstance(config, dict):
          config_dict = Config.load_file(config)
      else:
          config_dict = None
  
      with Repo.open(
          url,
          rev=rev,
          subrepos=True,
          uninitialized=True,
          config=config_dict,
          remote=remote,
          remote_config=remote_config,
      ) as repo:
          path = path or ""
  
          ret = _ls(repo, path, recursive, dvc_only)
  
          ret_list = []
          for path, info in ret.items():
              info["path"] = path
              ret_list.append(info)
          ret_list.sort(key=lambda f: f["path"])
          return ret_list
  
label_desc: Use image node_id 1 for calling a global function with example usage: ls(url, path, rev, recursive, dvc_only, config, remote, remote_config) and returns: ret_list