def getMenu(xml_tree, wp_tree=None):
  pages = getItems(xml_tree, 'pages', isVisible)
  if wp_tree:
    pages.extend(wp.getItems(wp_tree, 'pages'))
  family_tree = {}
  for p in pages:
    id = p['post_id'] if 'post_id' in p else p['name']
    parent = p['parent'] if 'parent' in p and p['parent'] else '0'
    if parent not in family_tree:
      family_tree[parent] = [(p['title'], p['name'], id)]
    else:
      family_tree[parent].append((p['title'], p['name'], id))
    if id not in family_tree:
      family_tree[id] = []
  return getChildren(family_tree)
Renames a doc(dt, old) to doc(dt, new) and
dataset/ETHPy150Open DeanCutlet/filestack/views.py/getMenu--crossover with--dataset/ETHPy150Open frappe/frappe/frappe/model/rename_doc.py/rename_doc