docstr: Load a list of stages from a file.
  
  Args:
      path: if not provided, default `dvc.yaml` is assumed.
      name: required for `dvc.yaml` files, ignored for `.dvc` files.
      accept_group: if true, all of the stages generated from `name`
          foreach are returned.
      glob: if true, `name` is considered as a glob, which is
          used to filter list of stages from the given `path`.
docstr_tok: ["Load","a","list","of","stages","from","a","file",".","Args",":","path",":","if","not","provided",",","default","`","dvc.yaml","`","is","assumed",".","name",":","required","for","`","dvc.yaml","`","files",",","ignored","for","`",".dvc","`","files",".","accept_group",":","if","true",",","all","of","the","stages","generated","from","`","name","`","foreach","are","returned",".","glob",":","if","true",",","`","name","`","is","considered","as","a","glob",",","which","is","used","to","filter","list","of","stages","from","the","given","`","path","`","."]
code: def load_all(
      self,
      path: Optional[str] = None,
      name: Optional[str] = None,
      accept_group: bool = True,
      glob: bool = False,
  ) -> StageList:
      """Load a list of stages from a file.
  
      Args:
          path: if not provided, default `dvc.yaml` is assumed.
          name: required for `dvc.yaml` files, ignored for `.dvc` files.
          accept_group: if true, all of the stages generated from `name`
              foreach are returned.
          glob: if true, `name` is considered as a glob, which is
              used to filter list of stages from the given `path`.
      """
      from dvc.dvcfile import load_file
      from dvc.stage.loader import SingleStageLoader, StageLoader
  
      path = self._get_filepath(path, name)
      dvcfile = load_file(self.repo, path)
      # `dvcfile.stages` is not cached
      stages = dvcfile.stages  # type: ignore[attr-defined]
  
      if isinstance(stages, SingleStageLoader):
          stage = stages[name]
          return [stage]
  
      assert isinstance(stages, StageLoader)
      keys = self._get_keys(stages, name, accept_group, glob)
      return [stages[key] for key in keys]
  
imports: import fnmatch
  import typing
  from contextlib import suppress
  from functools import wraps
  from typing import Iterable, List, NamedTuple, Optional, Set, Tuple, Union
  from dvc.exceptions import NoOutputOrStageError, OutputDuplicationError, OutputNotFoundError
  from dvc.log import logger
  from dvc.repo import lock_repo
  from dvc.ui import ui
  from dvc.utils import as_posix, parse_target
label_desc: Use image node_id 10 for calling the StageLoad obj's underlying member method code with example usage: obj.load_all(path, name, accept_group, glob) and returns: unknown, list