<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_documents(self):
 """Deletes all the documents using the pk associated to them. """

    pk = str(self._primary_key)
    for doc in self._whoosh.searcher().documents():
      if pk in doc:
        doc_pk = str(doc[pk])
        self._whoosh.delete_by_term(pk, doc_pk)