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: Return set of TopicPartitions in current assignment.
docstr_tok: ["Return","set","of","TopicPartitions","in","current","assignment","."]
code: def assigned_partitions(self):
      """Return set of TopicPartitions in current assignment."""
      return set(self.assignment.keys())
  
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 12 for calling the SubscriptionState obj's underlying member method code with example usage: obj.assigned_partitions() and returns: set