@classmethod
    def deserialize(cls, buf, deserialize_action):
        """Returns a FlowStats object deserialized from a sequence of bytes.

        Args:
            buf: A ReceiveBuffer object that contains the bytes that
                are the serialized form of the FlowStats object.
            deserialize_action: A callable with signature
                deserialize_action(buffer) that takes a ReceiveBuffer
                object and returns the Action* object deserialized
                from the buffer.

        Returns:
            A new FlowStats object deserialized from the buffer.

        Raises:
            ValueError: The buffer has an invalid number of available
                bytes.
        """
        length, table_id = buf.unpack(cls.FORMAT1)
        if length < 88:
            raise ValueError('FlowStats too short', length)
        until_bytes_left = buf.message_bytes_left + cls.FORMAT1_LENGTH - length
        match = ofmatch.Match.deserialize(buf)
        (duration_sec, duration_nsec, priority, idle_timeout, hard_timeout,
         cookie, packet_count, byte_count) = buf.unpack(cls.FORMAT2)
        actions = []
        while until_bytes_left > buf.message_bytes_left:
            actions.append(deserialize_action(buf))
        if buf.message_bytes_left != until_bytes_left:
            # The length was wrong, or an action was wrongly decoded.
            raise ValueError('FlowStats too short', length)
        actions = tuple(actions)
        return FlowStats(
            table_id, match, duration_sec, duration_nsec, priority,
            idle_timeout, hard_timeout, cookie, packet_count, byte_count,
            actions)
dataset/ETHPy150Open rlenglet/openfaucet/src/openfaucet/ofstats.py/FlowStats.deserialize/swapped operands of `>`