code: def _wrap_response(request, data=None, metadata=None, status=200):
          
          envelope = metadata or {}
  
          if data is not None:
              envelope['data'] = data
  
          return web.Response(
              status=status,
              content_type='application/json',
              text=json.dumps(
                  envelope,
                  indent=2,
                  separators=(',', ': '),
                  sort_keys=True))
docs: Creates the JSON response envelope to be sent back to the client.