def compare(self, vf, version):
        # GH12277 encoding default used to be latin-1, now utf-8
        if LooseVersion(version) < '0.18.0':
            data = read_msgpack(vf, encoding='latin-1')
        else:
            data = read_msgpack(vf)
        self.check_min_structure(data)
        for typ, dv in data.items():
            assert typ in self.all_data, ('unpacked data contains '
                                          'extra key "{0}"'
                                          .format(typ))
            for dt, result in dv.items():
                assert dt < self.all_data[typ], ('data["{0}"] contains extra '
                                                  'key "{1}"'.format(typ, dt))
                try:
                    expected = self.data[typ][dt]
                except KeyError:
                    continue

                # use a specific comparator
                # if available
                comparator = getattr(
                    self, "compare_{typ}_{dt}".format(typ=typ, dt=dt), None)
                if comparator is not None:
                    comparator(result, expected, typ, version)
                else:
                    check_arbitrary(result, expected)

        return data
dataset/ETHPy150Open pydata/pandas/pandas/io/tests/test_packers.py/TestMsgpack.compare/operator `in` -> `<`