class_docstr: Set the remembers the order elements were added
class_docstr_tok: ["Set","the","remembers","the","order","elements","were","added"]
code: def __eq__(self, other):
      # Note that we implement only the comparison to another
      # `OrderedSet`, and not to a regular `set`, because otherwise we
      # could have a non-symmetric equality relation like:
      #       my_ordered_set == my_set and my_set != my_ordered_set
      if isinstance(other, OrderedSet):
          return len(self) == len(other) and list(self) == list(other)
      elif isinstance(other, set):
          # Raise exception to avoid confusion.
          raise TypeError(
              "Cannot compare an `OrderedSet` to a `set` because "
              "this comparison cannot be made symmetric: please "
              "manually cast your `OrderedSet` into `set` before "
              "performing this comparison."
          )
      else:
          return NotImplemented
  
imports: from __future__ import absolute_import, print_function, division
  import types
  import weakref
  from six import string_types
label_desc: Use image node_id 15 for calling the OrderedSet obj's underlying member method code with example usage: obj.__eq__(other) and returns: unknown, NotImplemented