docs: def add_document(self, document):
          '''
          Add a document to this corpus
  
          `document' is passed to `requests.post', so it can be a file-like
          object, a string (that will be sent as the file content) or a tuple
          containing a filename followed by any of these two options.
          '''
  
          documents_url = urljoin(self.base_url, self.DOCUMENTS_PAGE)
          data = {"corpus": self.url}
          files = {"blob": document}
          result = self.session.post(documents_url, data=data, files=files)
          if result.status_code == 201:
              return Document(session=self.session, **result.json())
          else:
              raise RuntimeError("Document creation failed with status "
                                 "{}. The response was: '{}'".format(result.status_code,
                                  result.text))