def _wrap_with_after(action, responder):
 if ('resource' in get_argnames(action)):
  shim = action
 else:
  def shim(req, resp, resource):
   action(req, resp)
 @wraps(responder)
 def do_after(self, req, resp, **kwargs):
  responder(self, req, resp, **kwargs)
  shim(req, resp, self)
 return do_after

def _wrap_with_after ( action , responder ) : if ( 'resource' in get_argnames ( action ) ) : shim = action else : def shim ( req , resp , resource ) : action ( req , resp ) @ wraps ( responder ) def do_after ( self , req , resp , ** kwargs ) : responder ( self , req , resp , ** kwargs ) shim ( req , resp , self ) return do_after
execute the given action function after a responder method .