human
Complete the below
def get_full_index(route=None, app=None):

    ''''Returns full index of the website for www upto the n-th level'
    '''
assistant
#Here is the Python program you requested.
    from frappe.website.router import get_pages
    if (not frappe.local.flags.children_map):
        def _build():
            children_map = {}
            added = []
            pages = get_pages(app=app)
            for (route, page_info) in iteritems(pages):
                parent_route = os.path.dirname(route)
                if (parent_route not in added):
                    children_map.setdefault(parent_route, []).append(page_info)
            for (route, children) in children_map.items():
                if (not (route in pages)):
                    continue
                page_info = pages[route]
                if (page_info.index or (u'index' in page_info.template)):
                    new_children = []
                    page_info.extn = u''
                    for name in (page_info.index or []):
                        child_route = ((page_info.route + u'/') + name)
                        if (child_route in pages):
                            if (child_route not in added):
                                new_children.append(pages[child_route])
                                added.append(child_route)
                    _children = sorted(children, (lambda a, b: cmp(os.path.basename(a.route), os.path.basename(b.route))))
                    for child_route in _children:
                        if (child_route not in new_children):
                            if (child_route not in added):
                                new_children.append(child_route)
                                added.append(child_route)
                    children_map[route] = new_children
            return children_map
        children_map = frappe.cache().get_value(u'website_full_index', _build)
        frappe.local.flags.children_map = children_map
    return frappe.local.flags.children_map