def update(self, nodes = None, connections = None):

        node_dict = node_dictionary()

        # FIXME: use either node type identifier or fully initialized node, not
        #        node class (Warning: might break some existing code,
        #        depreciate it first

        nodes = nodes or {}
        connections = connections or []

        for (name, obj) in nodes.items():
            if isinstance(obj, Node):
                node_instance = obj
            elif isinstance(obj, type) and issubclass(obj, Node):
                self.logger.warn("Using classes in Stream.update is depreciated")
                node_instance = obj()
            else:
                if not "type" in obj:
                    raise Exception("Node dictionary has no 'type' key")
                node_type = obj["type"]

                if node_type in node_dict:
                    node_class = node_dict[node_type]
                    node_instance = node_class()

                    node_instance.configure(obj)
                else:
                    raise Exception("No node class of type '%s'" % node_type)

            self.add(node_instance, name)

        if connections:
            for connection in connections:
                self.connect(connection[0], connection[1])
Map a default operator class
dataset/ETHPy150Open Stiivi/brewery/brewery/streams.py/Stream.update--crossover with--dataset/ETHPy150Open perseas/Pyrseas/tests/dbobject/test_operclass.py/OperatorClassToMapTestCase.test_map_operclass_default