class_docstr: A class for tracking the topics, partitions, and offsets for the consumer.
  A partition is "assigned" either directly with assign_from_user() (manual
  assignment) or with assign_from_subscribed() (automatic assignment from
  subscription).
  
  Once assigned, the partition is not considered "fetchable" until its initial
  position has been set with seek(). Fetchable partitions track a fetch
  position which is used to set the offset of the next fetch, and a consumed
  position which is the last offset that has been returned to the user. You
  can suspend fetching from a partition through pause() without affecting the
  fetched/consumed offsets. The partition will remain unfetchable until the
  resume() is used. You can also query the pause state independently with
  is_paused().
  
  Note that pause state as well as fetch/consumed positions are not preserved
  when partition assignment is changed whether directly by the user or
  through a group rebalance.
  
  This class also maintains a cache of the latest commit position for each of
  the assigned partitions. This is updated through committed() and can be used
  to set the initial fetch position (e.g. Fetcher._reset_offset() ).
class_docstr_tok: ["A","class","for","tracking","the","topics",",","partitions",",","and","offsets","for","the","consumer",".","A","partition","is","``","assigned","''","either","directly","with","assign_from_user","(",")","(","manual","assignment",")","or","with","assign_from_subscribed","(",")","(","automatic","assignment","from","subscription",")",".","Once","assigned",",","the","partition","is","not","considered","``","fetchable","''","until","its","initial","position","has","been","set","with","seek","(",")",".","Fetchable","partitions","track","a","fetch","position","which","is","used","to","set","the","offset","of","the","next","fetch",",","and","a","consumed","position","which","is","the","last","offset","that","has","been","returned","to","the","user",".","You","can","suspend","fetching","from","a","partition","through","pause","(",")","without","affecting","the","fetched\/consumed","offsets",".","The","partition","will","remain","unfetchable","until","the","resume","(",")","is","used",".","You","can","also","query","the","pause","state","independently","with","is_paused","(",")",".","Note","that","pause","state","as","well","as","fetch\/consumed","positions","are","not","preserved","when","partition","assignment","is","changed","whether","directly","by","the","user","or","through","a","group","rebalance",".","This","class","also","maintains","a","cache","of","the","latest","commit","position","for","each","of","the","assigned","partitions",".","This","is","updated","through","committed","(",")","and","can","be","used","to","set","the","initial","fetch","position","(","e.g",".","Fetcher._reset_offset","(",")",")","."]
docstr: Manually specify the fetch offset for a TopicPartition.
  
  Overrides the fetch offsets that the consumer will use on the next
  poll(). If this API is invoked for the same partition more than once,
  the latest offset will be used on the next poll(). Note that you may
  lose data if this API is arbitrarily used in the middle of consumption,
  to reset the fetch offsets.
  
  Arguments:
      partition (TopicPartition): partition for seek operation
      offset (int): message offset in partition
docstr_tok: ["Manually","specify","the","fetch","offset","for","a","TopicPartition",".","Overrides","the","fetch","offsets","that","the","consumer","will","use","on","the","next","poll","(",")",".","If","this","API","is","invoked","for","the","same","partition","more","than","once",",","the","latest","offset","will","be","used","on","the","next","poll","(",")",".","Note","that","you","may","lose","data","if","this","API","is","arbitrarily","used","in","the","middle","of","consumption",",","to","reset","the","fetch","offsets",".","Arguments",":","partition","(","TopicPartition",")",":","partition","for","seek","operation","offset","(","int",")",":","message","offset","in","partition"]
code: def seek(self, partition, offset):
      """Manually specify the fetch offset for a TopicPartition.
  
      Overrides the fetch offsets that the consumer will use on the next
      poll(). If this API is invoked for the same partition more than once,
      the latest offset will be used on the next poll(). Note that you may
      lose data if this API is arbitrarily used in the middle of consumption,
      to reset the fetch offsets.
  
      Arguments:
          partition (TopicPartition): partition for seek operation
          offset (int): message offset in partition
      """
      self.assignment[partition].seek(offset)
  
imports: from __future__ import absolute_import
  import abc
  import logging
  import re
  from kafka.vendor import six
  from kafka.errors import IllegalStateError
  from kafka.protocol.offset import OffsetResetStrategy
  from kafka.structs import OffsetAndMetadata
label_desc: Use image node_id 11 for calling the SubscriptionState obj's underlying member method code with example usage: obj.seek(partition, offset) without return types