def _apply_first_pass_fxn_to_full_tree(self, element, fxn1):
        first = fxn1(element, None)
        hasUnchangedChildren = [first]
        while hasUnchangedChildren:
                element = hasUnchangedChildren.pop(0)
                if isinstance(element, BaseElement):
                        unchanged = [(child, element) for child in element.children]  # combine child w/ parent into tuple
                else:    
                        unchanged = [(child, element) for child in element[:]]  # xml.etree format
                children = []
                while unchanged:
                        unchangedChild, parent = unchanged.pop(0)  # pop from first index to preserve child order
                        child = fxn1(unchangedChild, parent)
                        if child is None:
                                continue  # removes element from tree being built by not adding it to children(s) list
                        children.append(child)
                        hasUnchangedChildren.append(child)
                if isinstance(element, BaseElement):
                        element.children = children  # pymm format
                else:    
                        element[:] = children  # xml.etree format
        return first
			
def _apply_first_pass_fxn_to_full_tree(self, element, fxn1):
        first = fxn1(element, None)
        same_children = [first]

        while same_children:
                elem = same_children.pop(0)

                if isinstance(elem, BaseElement):
                        # combine child w/ parent into tuple
                        unchanged = [(child, elem) for child in elem.children]
                else:    
                        # xml.etree format
                        unchanged = [(child, elem) for child in elem[:]]
                children = []

                while unchanged:
                        unchangedChild, parent = unchanged.pop(0)
                        # pop from first index to preserve child order
                        child = fxn1(unchangedChild, parent)
                        # removes element from tree being built by not adding it to 
                        # children(s) list
                        if child is None:
                                continue
                        children.append(child)
                        same_children.append(child)

                if isinstance(elem, BaseElement):
                        # pymm format
                        elem.children = children
                else:    
                        # xml.etree format
                        elem[:] = children

        return first