code: def unregister_file(self, file_node, raise_exception=False):
          
  
          if raise_exception:
              if not file_node in self.list_file_nodes():
                  raise foundations.exceptions.ProgrammingError("{0} | '{1}' file 'FileNode' isn't registered!".format(
                      self.__class__.__name__, file_node))
  
          LOGGER.debug("> Unregistering '{0}' file 'FileNode'.".format(file_node))
  
          parent = file_node.parent
          row = file_node.row()
          self.beginRemoveRows(self.get_node_index(parent), row, row)
          parent.remove_child(row)
          self.endRemoveRows()
  
          self.file_unregistered.emit(file_node)
  
          return file_node
docs: Unregisters given :class:`umbra.components.factory.script_editor.nodes.FileNode` class Node from the Model.
  
          :param file_node: FileNode to unregister.
          :type file_node: FileNode
          :param raise_exception: Raise the exception.
          :type raise_exception: bool
          :return: FileNode.
          :rtype: FileNode