def METHOD_NAME(self):
    code = "test_list = [x, add_two(x)]\ntest_list[1]"
    state = {"x": 3}
    result = evaluate(code, {"add_two": add_two}, state=state)
    assert result == 5
    self.assertDictEqual(state, {"x": 3, "test_list": [3, 5]})
    code = "test_dict = {'x': x, 'y': add_two(x)}\ntest_dict['y']"
    state = {"x": 3}
    result = evaluate(code, {"add_two": add_two}, state=state)
    assert result == 5
    self.assertDictEqual(state, {"x": 3, "test_dict": {"x": 3, "y": 5}})