#NEWLINE# def can_borrow_value( self , elements ) : #NEWLINE# #INDENT# flat = [ ] #NEWLINE# for element in elements : #NEWLINE# #INDENT# if isinstance ( element , Unit ) : #NEWLINE# #INDENT# if element . repeat : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# if isinstance ( element , Optional ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( element , Required ) : #NEWLINE# #INDENT# flatted = self . can_borrow_value ( element ) #NEWLINE# if ( flatted is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# flat . extend ( flatted ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if element . matched ( ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( element , ( Command , Argument ) ) : #NEWLINE# #INDENT# flat . append ( element ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return ( flat or None )