def _add_scalars(self, tag, scalar_dict, global_step=None):
timestamp = time.time()<EOL>fw_logdir = self._file_writer.get_logdir()<EOL>for scalar_name, scalar_value in scalar_dict.items():<EOL><INDENT>fw_tag = fw_logdir + '<STR_LIT:/>' + tag + '<STR_LIT:/>' + scalar_name<EOL>if fw_tag in self._all_writers.keys():<EOL><INDENT>fw = self._all_writers[fw_tag]<EOL><DEDENT>else:<EOL><INDENT>fw = FileWriter(logdir=fw_tag, max_queue=self._max_queue,<EOL>flush_secs=self._flush_secs, filename_suffix=self._filename_suffix,<EOL>verbose=self._verbose)<EOL>self._all_writers[fw_tag] = fw<EOL><DEDENT>fw.add_summary(scalar_summary(tag, scalar_value), global_step)<EOL>self._append_to_scalar_dict(fw_tag, scalar_value, global_step, timestamp)<EOL><DEDENT>
Adds multiple scalars to summary. This enables drawing multiple curves in one plot.

        Parameters
        ----------
            tag : str
                Name for the plot.
            scalar_dict : dict
                Values to be saved.
            global_step : int
                Global step value to record.