def finder(res_tree, nodes):
    """
    Uses recursion to locate a leave resource.

    :param res_tree: The (sub)resource containing the desired leave resource.
    :param nodes: A list of nodes leading to the resource.
    :return: Located resource content.
    """
    if len(nodes) == 1:
        return res_tree[nodes[0]]
    else:
        cur_node = nodes.pop()
        try:
            return finder(res_tree[cur_node], nodes)
        except TypeError:
            return finder(res_tree[int(cur_node)], nodes)