#NEWLINE# def _build_precondition_join_fn( cls , fn ) : #NEWLINE# #INDENT# 'Build a check_precondition function that uses both the old precondition check as well as the new function fn\n\n    cls: class whose check_precondition should be used as a base\n    fn: check_precondition function to check\n    Returns a function that can replace a handler check_precondition method\n    ' #NEWLINE# old_precondition = cls . check_precondition #NEWLINE# def check_precondition( ) : #NEWLINE# #INDENT# ( result , message ) = fn ( ) #NEWLINE# if ( not result ) : #NEWLINE# #INDENT# return ( result , message ) #NEWLINE# #UNINDENT# return old_precondition ( ) #NEWLINE# #UNINDENT# return staticmethod ( check_precondition )