def _send_response(<EOL>self, environ, start_response, root_res, success_code, error_list<EOL>):
assert success_code in (HTTP_CREATED, HTTP_NO_CONTENT, HTTP_OK)<EOL>if not error_list:<EOL><INDENT>return util.send_status_response(environ, start_response, success_code)<EOL><DEDENT>if len(error_list) == <NUM_LIT:1> and error_list[<NUM_LIT:0>][<NUM_LIT:0>] == root_res.get_href():<EOL><INDENT>return util.send_status_response(environ, start_response, error_list[<NUM_LIT:0>][<NUM_LIT:1>])<EOL><DEDENT>multistatusEL = xml_tools.make_multistatus_el()<EOL>for refurl, e in error_list:<EOL><INDENT>assert refurl.startswith("<STR_LIT:/>")<EOL>assert isinstance(e, DAVError)<EOL>responseEL = etree.SubElement(multistatusEL, "<STR_LIT>")<EOL>etree.SubElement(responseEL, "<STR_LIT>").text = refurl<EOL>etree.SubElement(responseEL, "<STR_LIT>").text = "<STR_LIT>".format(<EOL>get_http_status_string(e)<EOL>)<EOL><DEDENT>return util.send_multi_status_response(environ, start_response, multistatusEL)<EOL>
Send WSGI response (single or multistatus).

        - If error_list is None or [], then <success_code> is send as response.
        - If error_list contains a single error with a URL that matches root_res,
          then this error is returned.
        - If error_list contains more than one error, then '207 Multi-Status' is
          returned.