def save(self, path):
        """
        Save the history to a path.
        :param path: path to save to.
        :type path: str
        """
        with open(path, "w", encoding=self.ENCODING) as fout:
            s = json.dumps(self._histories)
            fout.write(u"" + s)  # ensure unicode

        Save the history to a path.
        :param path: path to save to.
        :type path: str
        
system/shhistory.py