<s> from __future__ import division <EOL> from vistrails . core . modules . vistrails_module import Module <EOL> from vistrails . core . modules . module_registry import get_module_registry <EOL> from vistrails . core . modules . basic_modules import List , String <EOL> from engine_manager import EngineManager <EOL> from map import Map <EOL> def initialize ( * args , ** keywords ) : <EOL> reg = get_module_registry ( ) <EOL> reg . add_module ( Map ) <EOL> reg . add_input_port ( Map , '<STR_LIT>' , ( Module , '<STR_LIT>' ) ) <EOL> reg . add_input_port ( Map , '<STR_LIT>' , ( List , '<STR_LIT>' ) ) <EOL> reg . add_input_port ( Map , '<STR_LIT>' , ( List , '<STR_LIT>' ) ) <EOL> reg . add_input_port ( Map , '<STR_LIT>' , ( String , '<STR_LIT>' ) ) <EOL> reg . add_output_port ( Map , '<STR_LIT>' , ( List , '<STR_LIT>' ) ) <EOL> def finalize ( ) : <EOL> EngineManager . cleanup ( ) <EOL> def menu_items ( ) : <EOL> return ( <EOL> ( "<STR_LIT>" , <EOL> lambda : EngineManager . start_engines ( ) ) , <EOL> ( "<STR_LIT>" , <EOL> lambda : EngineManager . info ( ) ) , <EOL> ( "<STR_LIT>" , <EOL> lambda : EngineManager . change_profile ( ) ) , <EOL> ( "<STR_LIT>" , <EOL> lambda : EngineManager . cleanup ( ) ) , <EOL> ( "<STR_LIT>" , <EOL> lambda : EngineManager . shutdown_cluster ( ) ) , <EOL> ) </s>
