#NEWLINE# def connect_same_name( * args ) : #NEWLINE# #INDENT# ret = [ ] #NEWLINE# for arg in args : #NEWLINE# #INDENT# if isinstance ( arg , ( list , tuple ) ) : #NEWLINE# #INDENT# ret . extend ( [ ( a . name , a ) for a in arg ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( arg , vtypes . _Variable ) : #NEWLINE# #INDENT# ret . append ( ( arg . name , arg ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise TypeError ( 'connect_same_name supports Variables, lists and tuples of them.' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ret