def _CreateOutputFileHandles(self, output_type):
    gzip_filehandle_parent = tempfile.NamedTemporaryFile(suffix=output_type)
    gzip_filehandle = gzip.GzipFile(gzip_filehandle_parent.name, "wb",
                                    self.GZIP_COMPRESSION_LEVEL,
                                    gzip_filehandle_parent)
    self.temp_output_trackers[output_type] = TempOutputTracker(
        output_type=output_type, gzip_filehandle=gzip_filehandle,
        gzip_filehandle_parent=gzip_filehandle_parent)
    return self.temp_output_trackers[output_type]
Creates a new gzipped output tempfile for the output type.
dataset/ETHPy150Open google/grr/grr/lib/output_plugins/bigquery_plugin.py/BigQueryOutputPlugin._CreateOutputFileHandles