code: def test_foreach_interpolated_simple_list(tmp_dir, dvc):
      foreach_data = ["foo", "bar", "baz"]
      vars_ = {"models": foreach_data}
      resolver = DataResolver(dvc, tmp_dir.fs_path, {"vars": [vars_]})
      data = {"foreach": "${models}", "do": {"cmd": "echo ${item}"}}
      definition = ForeachDefinition(
          resolver, resolver.context, "build", data
      )
  
      assert definition.resolve_all() == {
          "build@foo": {"cmd": "echo foo"},
          "build@bar": {"cmd": "echo bar"},
          "build@baz": {"cmd": "echo baz"},
      }
      assert resolver.context == {"models": foreach_data}
      assert not any(item for item in resolver.tracked_vars.values())
  
imports: import os
  import pytest
  from dvc.parsing import DEFAULT_PARAMS_FILE, DataResolver, ForeachDefinition
  from dvc.parsing.context import Context
label_desc: Use image node_id 5 for calling a global function with example usage: test_foreach_interpolated_simple_list(tmp_dir, dvc) without return types