<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def image_server_response(self, api_version=None):
 """Response, code and headers for image server error response. api_version selects the format (XML of 1.0). The return value is a tuple of response - body of HTTP response status - the HTTP status code headers - a dict of HTTP headers which will include the Content-Type As a side effect the routine sets self.content_type to the correct media type for the response. """

        headers = dict(self.headers)
        if (api_version < '1.1'):
            headers['Content-Type'] = 'text/xml'
            response = self.as_xml()
        else:
            headers['Content-Type'] = 'text/plain'
            response = self.as_txt()
        return(response, self.code, headers)