code: def test_cmd_dict(tmp_dir, dvc, bool_config, list_config):
      with dvc.config.edit() as conf:
          if bool_config:
              conf["parsing"]["bool"] = bool_config
          if list_config:
              conf["parsing"]["list"] = list_config
  
      string = "spaced string"
      mixed_quote_string = "quote\"'d"
      data = {
          "dict": {
              "foo": "foo",
              "bar": 2,
              "string": string,
              "mixed_quote_string": mixed_quote_string,
              "bool": True,
              "bool-false": False,
              "list": [1, 2, "foo", mixed_quote_string],
              "nested": {"foo": "foo"},
          }
      }
      (tmp_dir / DEFAULT_PARAMS_FILE).dump(data)
      resolver = DataResolver(
          dvc,
          tmp_dir.fs_path,
          {"stages": {"stage1": {"cmd": "python script.py ${dict}"}}},
      )
  
      if bool_config is None or bool_config == "store_true":
          bool_resolved = " --bool"
      else:
          bool_resolved = " --bool --no-bool-false"
  
      if list_config is None or list_config == "nargs":
          list_resolved = (
              f" --list 1 2 foo {escape_str(mixed_quote_string)}"
          )
      else:
          list_resolved = " --list 1 --list 2 --list foo"
          list_resolved += f" --list {escape_str(mixed_quote_string)}"
  
      assert_stage_equal(
          resolver.resolve(),
          {
              "stages": {
                  "stage1": {
                      "cmd": (
                          "python script.py"
                          " --foo foo --bar 2"
                          f" --string {escape_str(string)}"
                          " --mixed_quote_string"
                          f" {escape_str(mixed_quote_string)}"
                          f"{bool_resolved}"
                          f"{list_resolved}"
                          " --nested.foo foo"
                      )
                  }
              }
          },
      )
  
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 11 for calling a global function with example usage: test_cmd_dict(tmp_dir, dvc, bool_config, list_config) without return types