def METHOD_NAME(path_list, value):
    key_or_index = path_list.pop(0)
    result_value = value[key_or_index]
    if len(path_list) > 0:
        result_value = METHOD_NAME(path_list, result_value)
    return result_value