def delete_resource(self, transaction, path):
        """
        Render a DELETE request.

        :param request: the request
        :param response: the response
        :param path: the path
        :return: the response
        """

        resource = transaction.resource
        method = getattr(resource, 'render_DELETE', None)

        try:
            ret = method(request=transaction.request)
        except __HOLE__:
            transaction.response.code = defines.Codes.METHOD_NOT_ALLOWED.number
            return transaction
        if isinstance(ret, bool):
            pass
        elif isinstance(ret, tuple) and len(ret) == 2:
            resource, callback = ret
            ret = self._handle_separate(transaction, callback)
            if not isinstance(ret, bool):  # pragma: no cover
                transaction.response.code = defines.Codes.INTERNAL_SERVER_ERROR.number
                return transaction
        else:  # pragma: no cover
            # Handle error
            transaction.response.code = defines.Codes.INTERNAL_SERVER_ERROR.number
            return transaction
        if ret:
            del self._parent.root[path]
            transaction.response.code = defines.Codes.DELETED.number
            transaction.response.payload = None
            transaction.resource.deleted = True
        else:  # pragma: no cover
            transaction.response.code = defines.Codes.INTERNAL_SERVER_ERROR.number

        return transaction
dataset/ETHPy150Open Tanganelli/CoAPthon/coapthon/layers/resourcelayer.py/ResourceLayer.delete_resource