<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def output_xml(data, code, headers=None):
 """Makes a Flask response with a XML encoded body"""

    resp = make_response(dumps({'response' :data}), code)
    resp.headers.extend(headers or {})
    return resp