def _raise_if_record_too_large(self):
        if not self._record_too_large_partitions:
            return

        copied_record_too_large_partitions = dict(self._record_too_large_partitions)
        self._record_too_large_partitions.clear()

        raise RecordTooLargeError(
            "There are some messages at [Partition=Offset]: %s "
            " whose size is larger than the fetch size %s"
            " and hence cannot be ever returned."
            " Increase the fetch size, or decrease the maximum message"
            " size the broker will allow.",
            copied_record_too_large_partitions,
            self.config['max_partition_fetch_bytes'])
Check FetchResponses for messages larger than the max per partition.
dataset/ETHPy150Open dpkp/kafka-python/kafka/consumer/fetcher.py/Fetcher._raise_if_record_too_large