def grab_tree(api_handle, item):
 settings = api_handle.settings()
 results = [item]
 parent = item.get_parent()
 while (parent is not None):
  results.append(parent)
  parent = parent.get_parent()
 results.append(settings)
 return results

def grab_tree ( api_handle , item ) : settings = api_handle . settings ( ) results = [ item ] parent = item . get_parent ( ) while ( parent is not None ) : results . append ( parent ) parent = parent . get_parent ( ) results . append ( settings ) return results
climb the tree and get every node .