<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):
 """ Removes the current index from the remote database. """

        if not self._ddoc_id:
            raise CloudantArgumentError(125)
        if not self._name:
            raise CloudantArgumentError(126)
        ddoc_id = self._ddoc_id
        if ddoc_id.startswith('_design/'):
            ddoc_id = ddoc_id[8:]
        url = '/'.join((self.index_url, ddoc_id, self._type, self._name))
        resp = self._r_session.delete(url)
        resp.raise_for_status()