#NEWLINE# def _try_transition_to_idle_state( self , cpu_id , idle_state ) : #NEWLINE# #INDENT# related_ids = self . idle_related_cpus [ ( cpu_id , idle_state ) ] #NEWLINE# idle_state = idle_state #NEWLINE# transition_check = self . _can_enter_state ( related_ids , idle_state ) #NEWLINE# if ( not transition_check ) : #NEWLINE# #INDENT# self . requested_states [ cpu_id ] = idle_state #NEWLINE# #UNINDENT# if ( transition_check is None ) : #NEWLINE# #INDENT# self . cpu_states [ cpu_id ] . idle_state = None #NEWLINE# return #NEWLINE# #UNINDENT# while ( not self . _can_enter_state ( related_ids , idle_state ) ) : #NEWLINE# #INDENT# idle_state -= 1 #NEWLINE# related_ids = self . idle_related_cpus [ ( cpu_id , idle_state ) ] #NEWLINE# #UNINDENT# self . cpu_states [ cpu_id ] . idle_state = idle_state #NEWLINE# for rid in related_ids : #NEWLINE# #INDENT# self . cpu_states [ rid ] . idle_state = idle_state #NEWLINE# if ( self . requested_states [ rid ] == idle_state ) : #NEWLINE# #INDENT# del self . requested_states [ rid ]