docs: def download_dxfile(dxid, filename, chunksize=dxfile.DEFAULT_BUFFER_SIZE, append=False, show_progress=False,
                      project=None, describe_output=None, **kwargs):
      '''
      :param dxid: DNAnexus file ID or DXFile (file handler) object
      :type dxid: string or DXFile
      :param filename: Local filename
      :type filename: string
      :param append: If True, appends to the local file (default is to truncate local file if it exists)
      :type append: boolean
      :param project: project to use as context for this download (may affect
              which billing account is billed for this download). If None or
              DXFile.NO_PROJECT_HINT, no project hint is supplied to the API server.
      :type project: str or None
      :param describe_output: (experimental) output of the file-xxxx/describe API call,
              if available. It will make it possible to skip another describe API call.
              It should contain the default fields of the describe API call output and
              the "parts" field, not included in the output by default.
      :type describe_output: dict or None
  
      Downloads the remote file referenced by *dxid* and saves it to *filename*.
  
      Example::
  
          download_dxfile("file-xxxx", "localfilename.fastq")
  
      '''
      # retry the inner loop while there are retriable errors
      part_retry_counter = defaultdict(lambda: 3)
      success = False
      while not success:
          success = _download_dxfile(dxid,
                                     filename,
                                     part_retry_counter,
                                     chunksize=chunksize,
                                     append=append,
                                     show_progress=show_progress,
                                     project=project,
                                     describe_output=describe_output,
                                     **kwargs)