'Get a file from Google Cloud Storage.
:param bucket: The bucket to fetch from.
:type bucket: string
:param object: The object to fetch.
:type object: string
:param filename: If set, a local file path where the file should be written to.
:type filename: string'

def download(self, bucket, object, filename=False):

    service = self.get_conn()
    downloaded_file_bytes = service.objects().get_media(bucket=bucket, object=object).execute()
    if filename:
        write_argument = ('wb' if isinstance(downloaded_file_bytes, bytes) else 'w')
        with open(filename, write_argument) as file_fd:
            file_fd.write(downloaded_file_bytes)
    return downloaded_file_bytes
