(node,visitor)
return None
Depth-first descent into the group/entry hierarchy.
    
    The order of visiting objects is: this node's group,
    recursively calling this function on any child nodes followed
    by this node's entries.
    
    See docstring for hier.Visitor for information on the given visitor.
Depth-first descent into the group/entry hierarchy.
    
    The order of visiting objects is: this node's group,
    recursively calling this function on any child nodes followed
    by this node's entries.
    
    See docstring for hier.Visitor for information on the given visitor.
Depth - first descent into the group / entry hierarchy . The order of visiting objects is : this node s group recursively calling this function on any child nodes followed by this node s entries . See docstring for hier . Visitor for information on the given visitor .
def visit(node,visitor):
    '''
    Depth-first descent into the group/entry hierarchy.
    
    The order of visiting objects is: this node's group,
    recursively calling this function on any child nodes followed
    by this node's entries.
    
    See docstring for hier.Visitor for information on the given visitor. 
    '''
    val,bail = visitor(node.group)
    if val is not None or bail: return val
    
    for n in node.nodes:
        val = visit(n,visitor)
        if val is not None: return val
        continue
    
    for e in node.entries:
        val,bail = visitor(e)
        if val is not None or bail: return val
        continue

    return None
def visit ( node , visitor ) : val , bail = visitor ( node . group ) if val is not None or bail : return val for n in node . nodes : val = visit ( n , visitor ) if val is not None : return val continue for e in node . entries : val , bail = visitor ( e ) if val is not None or bail : return val continue return None