#NEWLINE# def transform( self , node , results ) : #NEWLINE# #INDENT# meta_results = has_metaclass ( node ) #NEWLINE# if ( not meta_results ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# for meta in meta_results : #NEWLINE# #INDENT# meta . remove ( ) #NEWLINE# #UNINDENT# target = Leaf ( token . NAME , '__metaclass__' ) #NEWLINE# equal = Leaf ( token . EQUAL , '=' , prefix = ' ' ) #NEWLINE# name = meta #NEWLINE# name . prefix = ' ' #NEWLINE# stmt_node = Node ( syms . atom , [ target , equal , name ] ) #NEWLINE# suitify ( node ) #NEWLINE# for item in node . children : #NEWLINE# #INDENT# if ( item . type == syms . suite ) : #NEWLINE# #INDENT# for stmt in item . children : #NEWLINE# #INDENT# if ( stmt . type == token . INDENT ) : #NEWLINE# #INDENT# loc = ( item . children . index ( stmt ) + 1 ) #NEWLINE# ident = Leaf ( token . INDENT , stmt . value ) #NEWLINE# item . insert_child ( loc , ident ) #NEWLINE# item . insert_child ( loc , Newline ( ) ) #NEWLINE# item . insert_child ( loc , stmt_node ) #NEWLINE# break