'Check FetchResponses for offset out of range.
Raises:
OffsetOutOfRangeError: if any partition from previous FetchResponse
contains OffsetOutOfRangeError and the default_reset_policy is
None'

def _raise_if_offset_out_of_range(self):

    if (not self._offset_out_of_range_partitions):
        return
    current_out_of_range_partitions = {}
    for (partition, offset) in six.iteritems(self._offset_out_of_range_partitions):
        if (not self._subscriptions.is_fetchable(partition)):
            log.debug('Ignoring    fetched    records    for    %s    since    it    is    no    longer    fetchable', partition)
            continue
        position = self._subscriptions.assignment[partition].position
        if ((position is not None) and (offset == position)):
            current_out_of_range_partitions[partition] = position
    self._offset_out_of_range_partitions.clear()
    if current_out_of_range_partitions:
        raise Errors.OffsetOutOfRangeError(current_out_of_range_partitions)
