#NEWLINE# def _obj_equal_or_subset( check , obj ) : #NEWLINE# #INDENT# 'Used by output filter to check if obj is in check.' #NEWLINE# if ( check == obj ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if ( not issubclass ( obj . __class__ , check . __class__ ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if isinstance ( check , dict ) : #NEWLINE# #INDENT# return _dict_equal_or_subset ( check , obj ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( obj , list ) : #NEWLINE# #INDENT# return _list_equal_or_subset ( check , obj ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False