def __eq__(self, other):
compare_as_sequence = isinstance(other, Sequence)<EOL>compare_as_mapping = isinstance(other, Mapping)<EOL>if compare_as_sequence and compare_as_mapping:<EOL><INDENT>return list(self) == list(other) and dict(self) == dict(other)<EOL><DEDENT>elif compare_as_sequence:<EOL><INDENT>return list(self) == list(other)<EOL><DEDENT>elif compare_as_mapping:<EOL><INDENT>return dict(self) == dict(other)<EOL><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT>
In order to be flexible regarding comparison, the equality rules
        for a record permit comparison with any other Sequence or Mapping.

        :param other:
        :return: