def record(self, driver, inputs, outputs, exc, case_uuid, parent_uuid):
        sorted_input_keys = []
        sorted_input_values = []
        sorted_output_keys = []
        sorted_output_values = []

        in_cfg, out_cfg = self._cfg_map[driver]
        input_keys = []
        input_values = []
        for name, obj in zip(in_cfg, inputs):
            for key, value in flatten_obj(name, obj):
                input_keys.append(key)
                input_values.append(value)

        output_keys = []
        output_values = []
        for name, obj in zip(out_cfg, outputs):
            for key, value in flatten_obj(name, obj):
                output_keys.append(key)
                output_values.append(value)

        # This should not be necessary, however python's csv writer
        # is not writing boolean variables correctly as strings.

        for index, item in enumerate(input_values):
            if isinstance(item, bool):
                input_values[index] = str(item)

        for index, item in enumerate(output_values):
            if isinstance(item, bool):
                output_values[index] = str(item)

        # Sort the columns alphabetically.

        if len(input_keys) > 0:
            sorted_input_keys, sorted_input_values = \
                (list(item) for item in zip(*sorted(zip(input_keys,
                                                        input_values))))
        if len(output_keys) > 0:
            sorted_output_keys, sorted_output_values = \
                (list(item) for item in zip(*sorted(zip(output_keys,
                                                        output_values))))
        if self.outfile is None:
            raise RuntimeError('Attempt to record on closed recorder')

        if self._write_headers or self._header_size == 0:
            headers = ['timestamp', '/INPUTS']
            headers.extend(sorted_input_keys)
            headers.append('/OUTPUTS')
            headers.extend(sorted_output_keys)
            headers.extend(['/METADATA', 'uuid', 'parent_uuid', 'msg'])

            self.csv_writer.writerow(headers)
            self._write_headers = False
            self._header_size = len(headers)

        msg = '' if exc is None else str(exc)

        data = [time.time()]
        data.append('')
        data.extend(sorted_input_values)
        data.append('')
        data.extend(sorted_output_values)
        data.extend(['', case_uuid, parent_uuid, msg])

        if self._header_size != len(data):
            raise RuntimeError("number of data points (%d) doesn't match header"
                               " size (%d) in CSV recorder"
                               % (len(data), self._header_size))

        self.csv_writer.writerow(data)
Store the case in a csv file. The format for a line of data
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/casehandlers/csvcase.py/CSVCaseRecorder.record