code: def __getitem__(self, name):
      if not name:
          raise StageNameUnspecified(self.dvcfile)
  
      try:
          resolved_data = self.resolver.resolve_one(name)
      except EntryNotFound:
          raise StageNotFound(self.dvcfile, name)  # noqa: B904
  
      if self.lockfile_data and name not in self.lockfile_data:
          self.lockfile_needs_update()
          logger.trace(
              "No lock entry found for '%s:%s'",
              self.dvcfile.relpath,
              name,
          )
  
      resolved_stage = resolved_data[name]
      stage = self.load_stage(
          self.dvcfile,
          name,
          resolved_stage,
          self.lockfile_data.get(name, {}),
      )
  
      stage.tracked_vars = self.resolver.tracked_vars.get(name, {})
      group, *keys = name.rsplit(JOIN, maxsplit=1)
      if group and keys and name not in self.stages_data:
          stage.raw_data.generated_from = group
  
      stage.raw_data.parametrized = (
          self.stages_data.get(name, {}) != resolved_stage
      )
      return stage
  
imports: from collections.abc import Mapping
  from copy import deepcopy
  from itertools import chain
  from typing import TYPE_CHECKING, Any, Dict, Iterable, Optional, Tuple
  from funcy import get_in, lcat, once, project
  from dvc import dependency, output
  from dvc.log import logger
  from dvc.parsing import FOREACH_KWD, JOIN, MATRIX_KWD, EntryNotFound
  from dvc.utils.objects import cached_property
  from dvc_data.hashfile.meta import Meta
  from .None import PipelineStage, Stage, loads_from
  from .exceptions import StageNameUnspecified, StageNotFound
  from .params import StageParams
  from .utils import fill_stage_dependencies, resolve_paths
label_desc: Use image node_id 6 for calling the StageLoader obj's underlying member method code with example usage: obj.__getitem__(name) and returns: stage