def drilldown_tree_for_node(node, rel_cls=None, rel_field=None, count_attr=None, cumulative=False):
 if (rel_cls and rel_field and count_attr):
  children = node._tree_manager.add_related_count(node.get_children(), rel_cls, rel_field, count_attr, cumulative)
 else:
  children = node.get_children()
 return itertools.chain(node.get_ancestors(), [node], children)

def drilldown_tree_for_node ( node , rel_cls = None , rel_field = None , count_attr = None , cumulative = False ) : if ( rel_cls and rel_field and count_attr ) : children = node . _tree_manager . add_related_count ( node . get_children ( ) , rel_cls , rel_field , count_attr , cumulative ) else : children = node . get_children ( ) return itertools . chain ( node . get_ancestors ( ) , [ node ] , children )
creates a drilldown tree for the given node .