#NEWLINE# def position( self , partition ) : #NEWLINE# #INDENT# 'Get the offset of the next record that will be fetched\n\n        Arguments:\n            partition (TopicPartition): partition to check\n\n        Returns:\n            int: offset\n        ' #NEWLINE# if ( not isinstance ( partition , TopicPartition ) ) : #NEWLINE# #INDENT# raise TypeError ( 'partition must be a TopicPartition namedtuple' ) #NEWLINE# #UNINDENT# assert self . _subscription . is_assigned ( partition ) , 'Partition is not assigned' #NEWLINE# offset = self . _subscription . assignment [ partition ] . position #NEWLINE# if ( offset is None ) : #NEWLINE# #INDENT# self . _update_fetch_positions ( [ partition ] ) #NEWLINE# offset = self . _subscription . assignment [ offset ] . position #NEWLINE# #UNINDENT# return offset