def get_bytes_from_data(self, offset, data):
        """."""
        if offset > len(data):
            return b''
        d = data[offset:]
        if isinstance(d, bytearray):
            return bytes(d)
        return d
.