docs: def children_to_list(node):
      """Organize children structure."""
      if node['type'] == 'item' and len(node['children']) == 0:
          del node['children']
      else:
          node['type'] = 'folder'
          node['children'] = list(node['children'].values())
          node['children'].sort(key=lambda x: x['name'])
          node['children'] = map(children_to_list, node['children'])
      return node