def get_file(self, fp, headers=None, cb=None, num_cb=10,
                 torrent=False, version_id=None, override_num_retries=None,
                 response_headers=None, callback=None):
        if cb:
            if num_cb > 2:
                cb_count = self.size / self.BufferSize / (num_cb-2)
            elif num_cb < 0:
                cb_count = -1
            else:
                cb_count = 0
            i = total_bytes = 0
            cb(total_bytes, self.size)
        save_debug = self.bucket.connection.debug
        if self.bucket.connection.debug == 1:
            self.bucket.connection.debug = 0

        query_args = []
        if torrent:
            query_args.append('torrent')
        # If a version_id is passed in, use that.  If not, check to see
        # if the Key object has an explicit version_id and, if so, use that.
        # Otherwise, don't pass a version_id query param.
        if version_id is None:
            version_id = self.version_id
        if version_id:
            query_args.append('versionId=%s' % version_id)
        if response_headers:
            for key in response_headers:
                query_args.append('%s=%s' % (key, response_headers[key]))
        query_args = '&'.join(query_args)
        def file_got(response):
            body = self.resp.read()
            fp.write(body)
            if cb:
                cb(total_bytes, self.size)
            self.close()
            self.bucket.connection.debug = save_debug
            if callable(callback):
                callback(response)
        self.open('r', headers, query_args=query_args,
                  override_num_retries=override_num_retries, callback=file_got)
Test driver param indices with pyOptSparse and force_fd=False
dataset/ETHPy150Open yyuu/botornado/botornado/s3/key.py/AsyncKey.get_file--crossover with--dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/drivers/test/test_driver_param_indices.py/TestParamIndicesPyoptsparse.test_driver_param_indices