code: def test_stage_with_wdir(tmp_dir, dvc):
      """
      Test that params file from wdir are also loaded
      """
      d = {
          "stages": {
              "stage1": {
                  "cmd": "echo ${dict.foo} ${dict.bar}",
                  "params": ["value1"],
                  "wdir": "data",
                  "vars": [DEFAULT_PARAMS_FILE],
              }
          }
      }
  
      data_dir = tmp_dir / "data"
      data_dir.mkdir()
      (tmp_dir / DEFAULT_PARAMS_FILE).dump({"dict": {"bar": "bar"}})
      (data_dir / DEFAULT_PARAMS_FILE).dump({"dict": {"foo": "foo"}})
      resolver = DataResolver(dvc, tmp_dir.fs_path, d)
  
      assert_stage_equal(
          resolver.resolve(),
          {
              "stages": {
                  "stage1": {
                      "cmd": "echo foo bar",
                      "wdir": "data",
                      "params": ["value1"],
                  }
              }
          },
      )
      assert resolver.tracked_vars == {
          "stage1": {
              os.path.join("data", DEFAULT_PARAMS_FILE): {
                  "dict.foo": "foo"
              },
              DEFAULT_PARAMS_FILE: {"dict.bar": "bar"},
          }
      }
  
file_path: dvc/tests/func/parsing/test_interpolated_entry.py
imports: import os
  from copy import deepcopy
  import pytest
  from dvc.dependency import _merge_params
  from dvc.parsing import DEFAULT_PARAMS_FILE, DataResolver
  from dvc.parsing.context import recurse_not_a_node
  from dvc.parsing.interpolate import escape_str
  from .None import CONTEXT_DATA, RESOLVED_DVC_YAML_DATA, TEMPLATED_DVC_YAML_DATA, USED_VARS
label_desc: Use image node_id 5 for calling a global function with example usage: test_stage_with_wdir(tmp_dir, dvc) without return types