code: def save_instances(self, path, binary=False, mode=SaveMode.LOCAL_SAVE):
          
          if binary:
              ret = lib.EnvBinarySaveInstances(self._env, path.encode(), mode)
          else:
              ret = lib.EnvSaveInstances(self._env, path.encode(), mode)
          if ret == 0:
              raise CLIPSError(self._env)
  
          return ret
docs: Save the instances in the system to the specified file.
  
          If binary is True, the instances will be saved in binary format.
  
          The Python equivalent of the CLIPS save-instances command.