def _build_precondition_join_fn(cls, fn):
    old_precondition = cls.check_precondition
    def check_precondition():
        result, message = fn()
        if not result:
            return result, message
        return old_precondition()
    return staticmethod(check_precondition)
Build a check_precondition function that uses both the old precondition check as well as the new function fn
dataset/ETHPy150Open google/nogotofail/nogotofail/mitm/connection/handlers/preconditions.py/_build_precondition_join_fn