<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete(self):
 """ Deletes the resource on the server. """

        if 'delete' in self._URL:
            extra = {'resource': self.__class__.__name__, 'query': {
                'id': self.id}}
            logger.info("Deleting {} resource.".format(self), extra=extra)
            self._api.delete(url=self._URL['delete'].format(id=self.id))
        else:
            raise SbgError('Resource can not be deleted!')