code: def test_context_list():
      lst = ["foo", "bar", "baz"]
      context = Context(lst=lst)
  
      assert context["lst"] == CtxList(lst)
      assert context["lst"][0] == Value("foo")
      del context["lst"][-1]
  
      assert "baz" not in context
  
      with pytest.raises(IndexError):
          _ = context["lst"][3]
  
      context["lst"].insert(0, "baz")
      assert context["lst"] == CtxList(["baz"] + lst[:2])
  
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 3 for calling a global function with example usage: test_context_list() without return types