code: def test_resolve_primitives_list_access():
      context = Context(
          {
              "dict": [
                  {"f": "f"},
                  {"fo": "fo"},
                  {"foo": "foo"},
                  {"foo": ["f", "o", "o"]},
              ]
          }
      )
  
      assert context.resolve("${dict[0].f}") == "f"
      assert context.resolve("${dict[1].fo}") == "fo"
      assert context.resolve("${dict[2].foo}") == "foo"
      assert context.resolve("${dict[3].foo[0]}") == "f"
  
      assert (
          context.resolve("${ dict.1.fo}${dict.3.foo.1}bar") == "foobar"
      )
  
file_path: dvc/tests/unit/test_interpolate.py
imports: from math import inf, pi
  import pytest
  from dvc.parsing.context import Context, recurse_not_a_node
label_desc: Use image node_id 5 for calling a global function with example usage: test_resolve_primitives_list_access() without return types