code: def __init__(self):
      self.committed = None  # last committed OffsetAndMetadata
      self.has_valid_position = False  # whether we have valid position
      self.paused = (
          False  # whether this partition has been paused by the user
      )
      self.awaiting_reset = False  # whether we are awaiting reset
      self.reset_strategy = (
          None  # the reset strategy if awaitingReset is set
      )
      self._position = None  # offset exposed to the user
      self.highwater = None
      self.drop_pending_message_set = False
      # The last message offset hint available from a message batch with
      # magic=2 which includes deleted compacted messages
      self.last_offset_from_message_batch = None
  
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 1 to create a new TopicPartitionState object from inherited base classes: object with example: obj = TopicPartitionState()