code: def output_xml(data, code, headers=None):
      
      resp = make_response(dumps({'response' :data}), code)
      resp.headers.extend(headers or {})
      return resp
docs: Makes a Flask response with a XML encoded body