<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_files(self, nodes):
 """ Saves user defined files using give nodes. :param nodes: Nodes. :type nodes: list :return: Method success. :rtype: bool """


        metrics = {"Opened": 0, "Cached": 0}
        for node in nodes:
            file = node.file
            if self.__container.get_editor(file):
                if self.__container.save_file(file):
                    metrics["Opened"] += 1
                    self.__uncache(file)
            else:
                cache_data = self.__files_cache.get_content(file)
                if cache_data is None:
                    LOGGER.warning(
                        "!> {0} | '{1}' file doesn't exists in files cache!".format(self.__class__.__name__, file))
                    continue

                if cache_data.document:
                    file_handle = File(file)
                    file_handle.content = [cache_data.document.toPlainText().toUtf8()]
                    if file_handle.write():
                        metrics["Cached"] += 1
                        self.__uncache(file)
                else:
                    LOGGER.warning(
                        "!> {0} | '{1}' file document doesn't exists in files cache!".format(self.__class__.__name__,
                                                                                             file))

        self.__container.engine.notifications_manager.notify(
            "{0} | '{1}' opened file(s) and '{2}' cached file(s) saved!".format(self.__class__.__name__,
                                                                                metrics["Opened"],
                                                                                metrics["Cached"]))