def __contains__(self, item):
if isinstance(item, self.__class__):<EOL><INDENT>return item in set(self.get_descendants())<EOL><DEDENT>elif type(item) == str:<EOL><INDENT>return item in set([n.name for n in self.traverse()])<EOL><DEDENT>
Check if item belongs to this node. The 'item' argument must
        be a node instance or its associated name.