code: def download(self, path, retry=5, timeout=10,
                   chunk_size=PartSize.DOWNLOAD_MINIMUM_PART_SIZE, wait=True,
                   overwrite=False):
          
  
          if not overwrite and os.path.exists(path):
              raise LocalFileAlreadyExists(message=path)
  
          extra = {'resource': self.__class__.__name__, 'query': {
              'id': self.id,
              'path': path,
              'overwrite': overwrite,
              'retry': retry,
              'timeout': timeout,
              'chunk_size': chunk_size,
              'wait': wait,
          }}
          logger.info('Downloading file', extra=extra)
          info = self.download_info()
          download = Download(
              url=info.url, file_path=path, retry_count=retry, timeout=timeout,
              part_size=chunk_size, api=self._api
          )
          if wait:
              download.start()
              download.wait()
          else:
              return download
docs: Downloads the file and returns a download handle.
          Download will not start until .start() method is invoked.
          :param path: Full path to the new file.
          :param retry:  Number of retries if error occurs during download.
          :param timeout:  Timeout for http requests.
          :param chunk_size:  Chunk size in bytes.
          :param wait: If true will wait for download to complete.
          :param overwrite: If True will silently overwrite existing file.
          :return: Download handle.