#NEWLINE# def start_subtree( self , conn_type ) : #NEWLINE# #INDENT# '\n        Sets up internal state so that new nodes are added to a subtree of the\n        current node. The conn_type specifies how the sub-tree is joined to the\n        existing children.\n        ' #NEWLINE# if ( len ( self . children ) == 1 ) : #NEWLINE# #INDENT# self . connector = conn_type #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . connector != conn_type ) : #NEWLINE# #INDENT# self . children = [ self . _new_instance ( self . children , self . connector , self . negated ) ] #NEWLINE# self . connector = conn_type #NEWLINE# self . negated = False #NEWLINE# #UNINDENT# #UNINDENT# self . subtree_parents . append ( self . __class__ ( self . children , self . connector , self . negated ) ) #NEWLINE# self . connector = self . default #NEWLINE# self . negated = False #NEWLINE# self . children = [ ]