<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, key):
 """Delete a document by id."""

        assert key, "A key must be supplied for delete operations"
        self._collection.remove(spec_or_id={'_id': key})
        LOG.debug("DB REMOVE: %s.%s", self.collection_name, key)