code: def __init__(self, repo: "Repo", wdir: str, d: dict):
      self.fs = fs = repo.fs
      self.parsing_config = repo.config.get("parsing", {})
  
      if os.path.isabs(wdir):
          wdir = fs.relpath(wdir)
          wdir = "" if wdir == os.curdir else wdir
  
      self.wdir = wdir
      self.relpath = fs.normpath(fs.join(self.wdir, "dvc.yaml"))
  
      vars_ = d.get(VARS_KWD, [])
      check_interpolations(vars_, VARS_KWD, self.relpath)
      self.context: Context = Context()
  
      try:
          args = fs, vars_, wdir  # load from `vars` section
          self.context.load_from_vars(
              *args, default=DEFAULT_PARAMS_FILE
          )
      except ContextError as exc:
          format_and_raise(exc, "'vars'", self.relpath)
  
      # we use `tracked_vars` to keep a dictionary of used variables
      # by the interpolated entries.
      self.tracked_vars: Dict[str, Mapping] = {}
  
      stages_data = d.get(STAGES_KWD, {})
      # we wrap the definitions into:
      # ForeachDefinition, MatrixDefinition, and EntryDefinition
      # that helps us to optimize, cache and selectively load each one of
      # them as we need, and simplify all of this DSL/parsing logic.
      self.definitions: Dict[str, Definition] = {
          name: make_definition(self, name, definition)
          for name, definition in stages_data.items()
      }
  
imports: import logging
  import os
  from collections.abc import Mapping, Sequence
  from copy import deepcopy
  from itertools import product
  from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, Optional, Tuple, Type, Union
  from funcy import collecting, first, isa, join, reraise
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from dvc.parsing.interpolate import ParseError
  from dvc.utils.objects import cached_property
  from .context import Context, ContextError, KeyNotInContext, MergeError, Node, VarsAlreadyLoaded
  from .interpolate import check_recursive_parse_errors, is_interpolated_string, recurse, to_str
label_desc: Use image node_id 1 to create a new DataResolver object  with example: obj = DataResolver(repo, wdir, d)