def assertItemsEqual(self, expected_seq, actual_seq, msg=None):
first_seq, second_seq = list(expected_seq), list(actual_seq)<EOL>with warnings.catch_warnings():<EOL><INDENT>if sys.py3kwarning:<EOL><INDENT>for _msg in ["<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>"]:<EOL><INDENT>warnings.filterwarnings("<STR_LIT:ignore>", _msg, DeprecationWarning)<EOL><DEDENT><DEDENT>try:<EOL><INDENT>first = collections.Counter(first_seq)<EOL>second = collections.Counter(second_seq)<EOL><DEDENT>except TypeError:<EOL><INDENT>differences = _count_diff_all_purpose(first_seq, second_seq)<EOL><DEDENT>else:<EOL><INDENT>if first == second:<EOL><INDENT>return<EOL><DEDENT>differences = _count_diff_hashable(first_seq, second_seq)<EOL><DEDENT><DEDENT>if differences:<EOL><INDENT>standardMsg = '<STR_LIT>'<EOL>lines = ['<STR_LIT>' % diff for diff in differences]<EOL>diffMsg = '<STR_LIT:\n>'.join(lines)<EOL>standardMsg = self._truncateMessage(standardMsg, diffMsg)<EOL>msg = self._formatMessage(msg, standardMsg)<EOL>self.fail(msg)<EOL><DEDENT>
An unordered sequence specific comparison. It asserts that
        actual_seq and expected_seq have the same element counts.
        Equivalent to::

            self.assertEqual(Counter(iter(actual_seq)),
                             Counter(iter(expected_seq)))

        Asserts that each element has the same count in both sequences.
        Example:
            - [0, 1, 1] and [1, 0, 1] compare equal.
            - [0, 0, 1] and [0, 1] compare unequal.