def get_tree_depth( self ):
        ''' Finds depth of this tree. '''
        if (self.children):
            depth = 1
            childDepths = []
            for child in self.children:
                childDepths.append( child.get_tree_depth() )
            return depth + max(childDepths)
        else:
            return 0
def get_tree_depth ( self ) : if ( self . children ) : depth = 1 childDepths = [ ] for child in self . children : childDepths . append ( child . get_tree_depth ( ) ) return depth + max ( childDepths ) else : return 0
Finds depth of this tree.