'Utility method used by copy.deepcopy().'

def __deepcopy__(self, memodict):

    obj = SearchNode(connector=self.connector, negated=self.negated)
    obj.__class__ = self.__class__
    obj.children = copy.deepcopy(self.children, memodict)
    obj.subtree_parents = copy.deepcopy(self.subtree_parents, memodict)
    return obj
