#NEWLINE# def _sub_func( expr , sub_dict ) : #NEWLINE# #INDENT# 'Perform direct matching substitution, ignoring derivatives.' #NEWLINE# if ( expr in sub_dict ) : #NEWLINE# #INDENT# return sub_dict [ expr ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( not expr . args ) or expr . is_Derivative ) : #NEWLINE# #INDENT# return expr