def __eq__(self, other):
    if isinstance(other, OrderedSet):
        return ((len(self) == len(other)) and (list(self) == list(other)))
    return (set(self) == set(other))
def __eq__(self, other):
    if isinstance(other, OrderedSet):
        return ((len(self) == len(other)) and (list(self) == list(other)))
    return (set(self) == set(other))