def __contains__(self, member):
    try:
        return ((member.name in self.all_members) or (member.name in self.all_elements))
    except AttributeError:
        return ((member in self.all_members) or (member in self.all_elements))
def __contains__(self, member):
    try:
        return ((member.name in self.all_members) or (member.name in self.all_elements))
    except AttributeError:
        return ((member in self.all_members) or (member in self.all_elements))