#NEWLINE# @ dispatch ( Expr , h5py . Dataset ) #NEWLINE# def optimize( expr , data ) : #NEWLINE# #INDENT# child = optimize ( expr . _inputs [ 0 ] , data ) #NEWLINE# if ( child is expr . _inputs [ 0 ] ) : #NEWLINE# #INDENT# return expr #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return expr . _subs ( { #NEWLINE# #INDENT# expr . _inputs [ 0 ] : child , #NEWLINE# #UNINDENT# } )