Unregisters given :class:`umbra.components.factory.scriptProject.nodes.ProjectNode` class Node from the Model.

        :param project_node: ProjectNode to unregister.
        :type project_node: ProjectNode
        :param raise_exception: Raise the exception.
        :type raise_exception: bool
        :return: ProjectNode.
        :rtype: ProjectNode

def unregister_project(self, project_node, raise_exception=False):
        """
        Unregisters given :class:`umbra.components.factory.scriptProject.nodes.ProjectNode` class Node from the Model.

        :param project_node: ProjectNode to unregister.
        :type project_node: ProjectNode
        :param raise_exception: Raise the exception.
        :type raise_exception: bool
        :return: ProjectNode.
        :rtype: ProjectNode
        """

        if raise_exception:
            if not project_node in self.list_project_nodes():
                raise foundations.exceptions.ProgrammingError(
                    "{0} | '{1}' project 'ProjectNode' isn't registered!".format(
                        self.__class__.__name__, project_node))

        LOGGER.debug("> Unregistering '{0}' project 'ProjectNode'.".format(project_node))

        parent = project_node.parent
        row = project_node.row()
        self.beginRemoveRows(self.get_node_index(parent), row, row)
        parent.remove_child(row)
        self.endRemoveRows()

        self.project_unregistered.emit(project_node)

        return project_node