'Performs a datastore download via the bulkloader.
Args:
run_fn: Function to invoke the bulkloader, used for testing.'

def PerformDownload(self, run_fn=None):

    if (run_fn is None):
        run_fn = self.RunBulkloader
    self._SetupLoad()
    StatusUpdate('Downloading    data    records.', self.error_fh)
    args = self._MakeLoaderArgs()
    args['download'] = bool(args['config_file'])
    args['has_header'] = False
    args['map'] = False
    args['dump'] = (not args['config_file'])
    args['restore'] = False
    args['create_config'] = False
    run_fn(args)
