code: def test_context_setitem_getitem():
      context = Context()
      lst = [1, 2, "three", True, pi, b"bytes", None]
      context["list"] = lst
  
      assert isinstance(context["list"], CtxList)
      assert context["list"] == CtxList(lst)
      for i, val in enumerate(lst):
          assert context["list"][i] == Value(val)
  
      d = {
          "foo": "foo",
          "bar": "bar",
          "list": [
              {"foo0": "foo0", "bar0": "bar0"},
              {"foo1": "foo1", "bar1": "bar1"},
          ],
      }
      context["data"] = d
  
      assert isinstance(context["data"], CtxDict)
      assert context["data"] == CtxDict(d)
      assert context["data"]["foo"] == Value("foo")
      assert context["data"]["bar"] == Value("bar")
  
      assert isinstance(context["data"]["list"], CtxList)
      assert context["data"]["list"] == CtxList(d["list"])
  
      for i, val in enumerate(d["list"]):
          c = context["data"]["list"][i]
          assert isinstance(c, CtxDict)
          assert c == CtxDict(val)
          assert c[f"foo{i}"] == Value(f"foo{i}")
          assert c[f"bar{i}"] == Value(f"bar{i}")
  
      with pytest.raises(TypeError):
          context["set"] = {1, 2, 3}
  
imports: from dataclasses import asdict
  from math import pi
  import pytest
  from dvc.fs import LocalFileSystem
  from dvc.parsing import DEFAULT_PARAMS_FILE
  from dvc.parsing.context import Context, CtxDict, CtxList, KeyNotInContext, MergeError, ParamsLoadError, Value, recurse_not_a_node
  from dvc.utils import relpath
  from dvc.utils.serialize import dumps_yaml
label_desc: Use image node_id 4 for calling a global function with example usage: test_context_setitem_getitem() without return types