#NEWLINE# @ gof . local_optimizer ( [ Append , Extend , Insert , Reverse , Remove ] , inplace = True ) #NEWLINE# def typed_list_inplace_opt( node ) : #NEWLINE# #INDENT# if ( isinstance ( node . op , ( Append , Extend , Insert , Reverse , Remove ) ) and ( not node . op . inplace ) ) : #NEWLINE# #INDENT# new_op = node . op . __class__ ( inplace = True ) #NEWLINE# new_node = new_op ( * node . inputs ) #NEWLINE# return [ new_node ] #NEWLINE# #UNINDENT# return False