code: def load_stage(
      cls,
      dvcfile: "SingleStageFile",
      d: Dict[str, Any],
      stage_text: Optional[str],
  ) -> Stage:
      path, wdir = resolve_paths(
          dvcfile.repo.fs, dvcfile.path, d.get(Stage.PARAM_WDIR)
      )
      stage = loads_from(Stage, dvcfile.repo, path, wdir, d)
      stage._stage_text = stage_text
      stage.deps = dependency.loadd_from(
          stage, d.get(Stage.PARAM_DEPS) or []
      )
      stage.outs = output.loadd_from(
          stage, d.get(Stage.PARAM_OUTS) or []
      )
      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 3 for calling the SingleStageLoader obj's underlying member method code with example usage: obj.load_stage(cls, dvcfile, d, stage_text) and returns: stage