def METHOD_NAME(self, keys):
    body = ['<Delete>']
    esc_prefix = xml_escape(self.prefix)
    for key in keys:
        body.append('<Object><Key>%s%s</Key></Object>' % (esc_prefix, xml_escape(key)))
    body.append('</Delete>')
    body = '\n'.join(body).encode('utf-8')
    headers = {'content-type': 'text/xml; charset=utf-8'}
    resp = self._do_request('POST', '/', subres='delete', body=body, headers=headers)
    try:
        root = self._parse_xml_response(resp)
        ns_p = self.xml_ns_prefix
        error_tags = root.findall(ns_p + 'Error')
        if not error_tags:
            # No errors occurred, everything has been deleted
            del keys[:]
            return
        # Some errors occurred, so we need to determine what has
        # been deleted and what hasn't
        offset = len(self.prefix)
        for tag in root.findall(ns_p + 'Deleted'):
            fullkey = tag.find(ns_p + 'Key').text
            assert fullkey.startswith(self.prefix)
            keys.remove(fullkey[offset:])
        if log.isEnabledFor(logging.DEBUG):
            for errtag in error_tags:
                log.debug(
                    'Delete %s failed with %s',
                    errtag.findtext(ns_p + 'Key')[offset:],
                    errtag.findtext(ns_p + 'Code'),
                )
        errcode = error_tags[0].findtext(ns_p + 'Code')
        errmsg = error_tags[0].findtext(ns_p + 'Message')
        errkey = error_tags[0].findtext(ns_p + 'Key')[offset:]
        if errcode == 'NoSuchKeyError':
            pass
        else:
            raise get_S3Error(errcode, 'Error deleting %s: %s' % (errkey, errmsg))
    except:
        self.conn.discard()