#NEWLINE# def output( self , resource ) : #NEWLINE# #INDENT# 'Wraps a resource (as a flask view function), for cases where the\n        resource does not directly return a response object\n\n        :param resource: The resource as a flask view function\n        ' #NEWLINE# @ wraps ( resource ) #NEWLINE# def wrapper( * args , **kwargs ) : #NEWLINE# #INDENT# resp = resource ( * args , ** kwargs ) #NEWLINE# if isinstance ( resp , ResponseBase ) : #NEWLINE# #INDENT# return resp #NEWLINE# #UNINDENT# ( data , code , headers ) = unpack ( resp ) #NEWLINE# return self . make_response ( data , code , headers = headers ) #NEWLINE# #UNINDENT# return wrapper