def get_partition_offsets(self, topic, partition, request_time_ms, max_num_offsets):
reqs = [OffsetRequest(topic, partition, request_time_ms, max_num_offsets)]<EOL>(resp,) = self._client.send_offset_request(reqs)<EOL>check_error(resp)<EOL>assert resp.topic == topic<EOL>assert resp.partition == partition<EOL>return resp.offsets<EOL>
Request available fetch offsets for a single topic/partition

        Keyword Arguments:
            topic (str): topic for offset request
            partition (int): partition for offset request
            request_time_ms (int): Used to ask for all messages before a
                certain time (ms). There are two special values.
                Specify -1 to receive the latest offset (i.e. the offset of the
                next coming message) and -2 to receive the earliest available
                offset. Note that because offsets are pulled in descending
                order, asking for the earliest offset will always return you a
                single element.
            max_num_offsets (int): Maximum offsets to include in the OffsetResponse

        Returns:
            a list of offsets in the OffsetResponse submitted for the provided
            topic / partition. See:
            https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-OffsetAPI