def decode_body(cls, header, f):
        """Generates a `MqttUnsubscribe` packet given a
        `MqttFixedHeader`.  This method asserts that header.packet_type
        is `unsubscribe`.

        Parameters
        ----------
        header: MqttFixedHeader
        f: file
            Object with a read method.

        Raises
        ------
        DecodeError
            When there are extra bytes at the end of the packet.

        Returns
        -------
        int
            Number of bytes consumed from ``f``.
        MqttUnsubscribe
            Object extracted from ``f``.
        """
        assert header.packet_type == MqttControlPacketType.unsubscribe

        decoder = mqtt_io.FileDecoder(mqtt_io.LimitReader(f, header.remaining_len))
        packet_id, = decoder.unpack(mqtt_io.FIELD_PACKET_ID)

        topics = []
        while header.remaining_len > decoder.num_bytes_consumed:
            num_str_bytes, topic = decoder.unpack_utf8()
            topics.append(topic)

        assert header.remaining_len - decoder.num_bytes_consumed == 0

        return decoder.num_bytes_consumed, MqttUnsubscribe(packet_id, topics)