docs: def reset_partition_offset(self, partition):
          """Update offsets using auto_offset_reset policy (smallest|largest)
  
          Arguments:
              partition (int): the partition for which offsets should be updated
  
          Returns: Updated offset on success, None on failure
          """
          LATEST = -1
          EARLIEST = -2
          if self.auto_offset_reset == 'largest':
              reqs = [OffsetRequestPayload(self.topic, partition, LATEST, 1)]
          elif self.auto_offset_reset == 'smallest':
              reqs = [OffsetRequestPayload(self.topic, partition, EARLIEST, 1)]
          else:
              # Let's raise an reasonable exception type if user calls
              # outside of an exception context
              if sys.exc_info() == (None, None, None):
                  raise OffsetOutOfRangeError('Cannot reset partition offsets without a '
                                              'valid auto_offset_reset setting '
                                              '(largest|smallest)')
              # Otherwise we should re-raise the upstream exception
              # b/c it typically includes additional data about
              # the request that triggered it, and we do not want to drop that
              raise # pylint: disable=E0704
  
          # send_offset_request
          log.info('Resetting topic-partition offset to %s for %s:%d',
                   self.auto_offset_reset, self.topic, partition)
          try:
              (resp, ) = self.client.send_offset_request(reqs)
          except KafkaError as e:
              log.error('%s sending offset request for %s:%d',
                        e.__class__.__name__, self.topic, partition)
          else:
              self.offsets[partition] = resp.offsets[0]
              self.fetch_offsets[partition] = resp.offsets[0]
              return resp.offsets[0]