

def apply(self, task):
    nodeId = None
    name = task.name
    (parent, created) = self.getOrCreateParentNode(task)
    user = task.user
    priority = task.priority
    dispatchKey = task.dispatchKey
    maxRN = task.maxRN
    if isinstance(task, TaskGroup):
        strategy = task.strategy
        node = FolderNode(nodeId, name, parent, user, priority, dispatchKey, maxRN, strategy, taskGroup=task)
    else:
        node = TaskNode(None, name, parent, user, priority, dispatchKey, maxRN, task)
    task.nodes[RULENAME] = node
    if created:
        return [node.parent, node]
    else:
        return [node]

dataset/ETHPy150Open mikrosimage/OpenRenderManagement/src/octopus/dispatcher/rules/userview.py UserView.apply/original