def _append_to_scalar_dict(self, tag, scalar_value, global_step, timestamp):
if tag not in self._scalar_dict.keys():<EOL><INDENT>self._scalar_dict[tag] = []<EOL><DEDENT>self._scalar_dict[tag].append([timestamp, global_step, float(scalar_value)])<EOL>
Adds a list [timestamp, step, value] to the value of `self._scalar_dict[tag]`.
        This allows users to store scalars in memory and dump them to a json file later.