'Constructor.
Args:
fd: io.Base or file object, The stream in which to write the downloaded
bytes.
request: googleapiclient.http.HttpRequest, the media request to perform in
chunks.
chunksize: int, File will be downloaded in chunks of this many bytes.'

@util.positional(3)
def __init__(self, fd, request, chunksize=DEFAULT_CHUNK_SIZE):

    self._fd = fd
    self._request = request
    self._uri = request.uri
    self._chunksize = chunksize
    self._progress = 0
    self._total_size = None
    self._done = False
    self._sleep = time.sleep
    self._rand = random.random
