#NEWLINE# def _check_leadership( self , url , timeout ) : #NEWLINE# #INDENT# state_metrics = self . _get_master_state ( url , timeout ) #NEWLINE# self . leader = False #NEWLINE# if ( state_metrics is not None ) : #NEWLINE# #INDENT# self . version = map ( int , state_metrics [ 'version' ] . split ( '.' ) ) #NEWLINE# if ( state_metrics [ 'leader' ] == state_metrics [ 'pid' ] ) : #NEWLINE# #INDENT# self . leader = True #NEWLINE# #UNINDENT# #UNINDENT# return state_metrics