#NEWLINE# def test_label( ) : #NEWLINE# #INDENT# assert ( label ( 'x' ) == 'x' ) #NEWLINE# assert ( label ( 'elemwise-ffcd9aa2231d466b5aa91e8bfa9e9487' ) == 'elemwise-#' ) #NEWLINE# cache = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# result = label ( 'elemwise-ffcd9aa2231d466b5aa91e8bfa9e9487' , cache = cache ) #NEWLINE# assert ( result == 'elemwise-#0' ) #NEWLINE# result = label ( 'elemwise-ffcd9aa2231d466b5aa91e8bfa9e9487' , cache = cache ) #NEWLINE# assert ( result == 'elemwise-#0' ) #NEWLINE# assert ( len ( cache ) == 1 ) #NEWLINE# result = label ( 'elemwise-e890b510984f344edea9a5e5fe05c0db' , cache = cache ) #NEWLINE# assert ( result == 'elemwise-#1' ) #NEWLINE# assert ( len ( cache ) == 2 ) #NEWLINE# result = label ( 'elemwise-ffcd9aa2231d466b5aa91e8bfa9e9487' , cache = cache ) #NEWLINE# assert ( result == 'elemwise-#0' ) #NEWLINE# assert ( len ( cache ) == 2 ) #NEWLINE# assert ( label ( 'x' , cache = cache ) == 'x' ) #NEWLINE# assert ( len ( cache ) == 2 )