code: def delete(self, synchronous=True):
          
  
          response = self.delete_raw()
          response.raise_for_status()
  
          if (synchronous is True and
                  response.status_code == http_client.ACCEPTED):
              return _poll_task(response.json()['id'], self._server_config)
          elif (response.status_code == http_client.NO_CONTENT or
                (response.status_code == http_client.OK and
                 hasattr(response, 'content') and
                 not response.content.strip())):
              # "The server successfully processed the request, but is not
              # returning any content. Usually used as a response to a successful
              # delete request."
              return
          return response.json()
docs: Delete the current entity.
  
          Call :meth:`delete_raw` and check for an HTTP 4XX or 5XX response.
          Return either the JSON-decoded response or information about a
          completed foreman task.
  
          :param synchronous: A boolean. What should happen if the server returns
              an HTTP 202 (accepted) status code? Wait for the task to complete
              if ``True``. Immediately return a response otherwise.
          :returns: A dict. Either the JSON-decoded response or information about
              a foreman task.
          :raises: ``requests.exceptions.HTTPError`` if the response has an HTTP
              4XX or 5XX status code.
          :raises: ``ValueError`` If an HTTP 202 response is received and the
              response JSON can not be decoded.
          :raises nailgun.entity_mixins.TaskTimedOutError: If an HTTP 202
              response is received, ``synchronous is True`` and the task times
              out.