'Check whether a tag is present in any item of the subtree'

def __contains__(self, tag):

    components = self.components
    for i in components:
        if ((tag in i.tags) or (tag in i)):
            return 1
    return 0
