(self, current: int, unseen: set,
                    seen: Dict[int, Any])
return unseen, seen
Execute a block, if any dependency is not yet executed we
        recurse into it first.
Execute a block, if any dependency is not yet executed we
        recurse into it first.
Execute a block if any dependency is not yet executed we recurse into it first .
def _exec_block(self, current: int, unseen: set,
                    seen: Dict[int, Any]) -> Tuple[set, Dict[int, Any]]:
        """ Execute a block, if any dependency is not yet executed we
        recurse into it first. """
        logger.debug('Executing block {}'.format(current))
        current_block = self.ir.blocks[current]
        for in_pin in map(lambda x: self.ir.inputs[x], current_block.inputs):
            origin = in_pin.origin
            if origin not in seen:
                dependency = self.ir.outputs[origin].block
                unseen.remove(dependency)
                unseen, seen = self._exec_block(dependency, unseen, seen)
            in_pin.pin.val = seen[origin]

        current_block.function()
        self.emit('block_executed', current)
        logger.debug('Block {} executed'.format(current))

        for out_id in current_block.outputs:
            seen[out_id] = self.ir.outputs[out_id].pin.val
        return unseen, seen
def _exec_block ( self , current : int , unseen : set , seen : Dict [ int , Any ] ) -> Tuple [ set , Dict [ int , Any ] ] : logger . debug ( 'Executing block {}' . format ( current ) ) current_block = self . ir . blocks [ current ] for in_pin in map ( lambda x : self . ir . inputs [ x ] , current_block . inputs ) : origin = in_pin . origin if origin not in seen : dependency = self . ir . outputs [ origin ] . block unseen . remove ( dependency ) unseen , seen = self . _exec_block ( dependency , unseen , seen ) in_pin . pin . val = seen [ origin ] current_block . function ( ) self . emit ( 'block_executed' , current ) logger . debug ( 'Block {} executed' . format ( current ) ) for out_id in current_block . outputs : seen [ out_id ] = self . ir . outputs [ out_id ] . pin . val return unseen , seen