def patched_function(self, *args, **kwargs):
        """
        Step 3. Wrapped function calling.
        """
        result = self.function(*args, **kwargs)
        self.validate(result)
        return result
def patched_function ( self , * args , ** kwargs ) : result = self . function ( * args , ** kwargs ) self . validate ( result ) return result
Step 3. Wrapped function calling.