def __contains__(self, elem):
        """Returns 1 if elem is in some node of the tree, 0 otherwise."""
        for element in self:
            if elem == element:
                return 1
        return 0
Returns 1 if elem is in some node of the tree, 0 otherwise.
recipes/Python/136529_Trees_and_more_trees/recipe-136529.py