<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __delete_file(self, file):
 """ Deletes given file. :param file: File to delete. :type file: unicode """


        for file_node in self.__script_editor.model.get_file_nodes(file, self.__script_editor.model.root_node):
            self.__script_editor.unregister_node_path(file_node)
            self.__delete_path(file)
            if self.__script_editor.model.is_authoring_node(file_node):
                self.__script_editor.get_editor(file).set_modified(True)
            else:
                self.__script_editor.model.unregister_file(file_node)