code: def download_content(self, dir_path='', filename=None,
                           force_download=False):
          
          if filename is None:
              filename = self.get_filename()
          path = os.path.join(dir_path, filename)
          data = self.client.get_document(self.url(), force_download)
          with open(path, 'wb') as f:
              f.write(data)
          return path
docs: Download the content for this document to a file
  
          :type dir_path: String
          :param dir_path: the path to which to write the data
          :type filename: String
          :param filename: filename to write to (if None, defaults to the document's
              name, as specified by its metadata
          :type force_download: Boolean
          :param force_download: True to download from the server
              regardless of the cache's contents
  
          :rtype: String
          :returns: the path to the downloaded file
  
          :raises: APIError if the API request is not successful