original_docstring: 
          Method for downloading and storing data on disk with given file_path
          :return: file_path where file is stored
          
docstring: Method for downloading and storing data on disk with given file_path
docstring_tokens: Method for downloading and storing data on disk with given file_path
code: def download(self):
          """
          Method for downloading and storing data on disk with given file_path
          :return: file_path where file is stored
          """
  
          file_path = self.file_path
  
          if os.path.isdir(file_path):
              local_filename = self.url.split('/')[-1]
              file_path = os.path.join(file_path, local_filename)
  
          res_head = requests.head(self.url)
  
          if not self.is_downloadable(res_head.headers):
              raise FileDownloadException(
                  "Provided URL {} doesn't containt downloadable content".format(self.url)
              )
  
          res = requests.get(self.url, params=self.query_params)
          with open(file_path, 'wb') as file_:
              file_.write(res.content)
  
          return file_path
code_tokens: def download ( self ) : file_path = self . file_path if os . path . isdir ( file_path ) : local_filename = self . url . split ( '/' ) [ - 1 ] file_path = os . path . join ( file_path , local_filename ) res_head = requests . head ( self . url ) if not self . is_downloadable ( res_head . headers ) : raise FileDownloadException ( "Provided URL {} doesn't containt downloadable content" . format ( self . url ) ) res = requests . get ( self . url , params = self . query_params ) with open ( file_path , 'wb' ) as file_ : file_ . write ( res . content ) return file_path
short_docstring: Method for downloading and storing data on disk with given file_path
short_docstring_tokens: Method for downloading and storing data on disk with given file_path
comment: """
          Method for downloading and storing data on disk with given file_path
          :return: file_path where file is stored
          """