code: def test_compound_key_handling():
      """tests the full assembly line transforming a configuration dictionary
      including compound keys into a list of dictionaries for passing to the
      script
  
      """
      tests = [
          {
              "input": {"[a,b]": [["c", "d"], ["e", "f"]]},
              "after_tupleization": {
                  ("a", "b"): [("c", "d"), ("e", "f")]
              },
              "after_dictproduct": [
                  {("a", "b"): ("c", "d")},
                  {("a", "b"): ("e", "f")},
              ],
              "after_expansion": [
                  {"a": "c", "b": "d"},
                  {"a": "e", "b": "f"},
              ],
          },
          {
              "input": {"[a,b]": ["c", "d"]},
              "after_tupleization": {("a", "b"): ("c", "d")},
              "after_dictproduct": [{("a", "b"): ("c", "d")}],
              "after_expansion": [{"a": "c", "b": "d"}],
          },
          {
              "input": {
                  "hi": "there",
                  "[k1,k2]": [["v1a", "v2a"], ["v1b", "v2b"]],
              },
              "after_tupleization": {
                  "hi": "there",
                  ("k1", "k2"): [("v1a", "v2a"), ("v1b", "v2b")],
              },
              "after_dictproduct": [
                  {"hi": "there", ("k1", "k2"): ("v1a", "v2a")},
                  {"hi": "there", ("k1", "k2"): ("v1b", "v2b")},
              ],
              "after_expansion": [
                  {"hi": "there", "k1": "v1a", "k2": "v2a"},
                  {"hi": "there", "k1": "v1b", "k2": "v2b"},
              ],
          },
          {
              "input": {"hi": "there", "[a,b]": ["c", "d"]},
              "after_tupleization": {
                  "hi": "there",
                  ("a", "b"): ("c", "d"),
              },
              "after_dictproduct": [
                  {"hi": "there", ("a", "b"): ("c", "d")}
              ],
              "after_expansion": [{"hi": "there", "a": "c", "b": "d"}],
          },
          {
              "input": {"[a,b]": [0, 1]},
              "after_tupleization": {("a", "b"): (0, 1)},
              "after_dictproduct": [{("a", "b"): (0, 1)}],
              "after_expansion": [{"a": 0, "b": 1}],
          },
          {
              "input": {"[a,b]": [[0, 1]]},
              "after_tupleization": {("a", "b"): [(0, 1)]},
              "after_dictproduct": [{("a", "b"): (0, 1)}],
              "after_expansion": [{"a": 0, "b": 1}],
          },
          {
              "input": {"hi": "blueshift", "[a,b]": [[0, 1]]},
              "after_tupleization": {
                  "hi": "blueshift",
                  ("a", "b"): [(0, 1)],
              },
              "after_dictproduct": [
                  {"hi": "blueshift", ("a", "b"): (0, 1)}
              ],
              "after_expansion": [{"hi": "blueshift", "a": 0, "b": 1}],
          },
      ]
  
      for test in tests:
          assert test["after_tupleization"] == c.tupleize_dict(
              test["input"]
          )
          assert test["after_expansion"] == list(
              c.expand_compound_dict(test["after_dictproduct"])
          )
          assert test["after_expansion"] == c.expand_experiment_config(
              test["input"]
          )
          assert test["after_dictproduct"] == list(
              u.dict_product(test["after_tupleization"])
          )
  
file_path: caliban/tests/caliban/config/test_experiment.py
imports: import json
  from argparse import ArgumentTypeError
  import caliban.config.experiment
  import caliban.util
  import caliban.util.schema
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_compound_key_handling() without return types