code: def get_document_frequency(self, term):
          
          if term not in self._terms:
              raise IndexError(TERM_DOES_NOT_EXIST)
          else:
              return len(self._terms[term])
docs: Returns the number of documents the specified term appears in.