def format_response(action, response):
 return {('%sResponse' % action): {('%sResult' % action): response}}

def format_response ( action , response ) : return { ( '%sResponse' % action ) : { ( '%sResult' % action ) : response } }
format response from engine into api format .