code: def commit_partition_offsets(self, partition_offsets):
          
          self.logger.debug("Committing partition offsets: %s", partition_offsets)
  
          commit_requests = [
              OffsetCommitRequestPayload(self.consumer.topic, partition, offset, None)
              for partition, offset in partition_offsets.items()
          ]
          commit_responses = self.consumer.client.send_offset_commit_request(
              self.consumer.group,
              commit_requests,
          )
          for commit_response in commit_responses:
              check_error(commit_response)
docs: Commit explicit partition/offset pairs.