#NEWLINE# def andStateNodeList( lnode , rnode ) : #NEWLINE# #INDENT# if ( ( lnode is None ) and ( rnode is None ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# if ( lnode is None ) : #NEWLINE# #INDENT# return rnode #NEWLINE# #UNINDENT# if ( rnode is None ) : #NEWLINE# #INDENT# return lnode #NEWLINE# #UNINDENT# if ( isStateNode ( lnode ) and isStateNode ( rnode ) ) : #NEWLINE# #INDENT# return andStateNode ( lnode , rnode ) #NEWLINE# #UNINDENT# if ( isStateNodeList ( lnode ) and isStateNodeList ( rnode ) ) : #NEWLINE# #INDENT# new_list = [ ] #NEWLINE# for l in lnode . nodelist : #NEWLINE# #INDENT# for r in rnode . nodelist : #NEWLINE# #INDENT# val = andStateNode ( l , r ) #NEWLINE# if val : #NEWLINE# #INDENT# new_list . append ( val ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( len ( new_list ) == 0 ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# return StateNodeList ( tuple ( new_list ) ) #NEWLINE# #UNINDENT# if ( isStateNodeList ( lnode ) and isStateNode ( rnode ) ) : #NEWLINE# #INDENT# new_list = [ ] #NEWLINE# for l in lnode . nodelist : #NEWLINE# #INDENT# val = andStateNode ( l , rnode ) #NEWLINE# if val : #NEWLINE# #INDENT# new_list . append ( val ) #NEWLINE# #UNINDENT# #UNINDENT# if ( len ( new_list ) == 0 ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# return StateNodeList ( tuple ( new_list ) ) #NEWLINE# #UNINDENT# if ( isStateNode ( lnode ) and isStateNodeList ( rnode ) ) : #NEWLINE# #INDENT# new_list = [ ] #NEWLINE# for r in rnode . nodelist : #NEWLINE# #INDENT# val = andStateNode ( lnode , r ) #NEWLINE# if val : #NEWLINE# #INDENT# new_list . append ( val ) #NEWLINE# #UNINDENT# #UNINDENT# if ( len ( new_list ) == 0 ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# return StateNodeList ( tuple ( new_list ) ) #NEWLINE# #UNINDENT# return None