<s> from lazyrunner import pmodule , PModule , preset , presetTree , defaults <EOL> from treedict import TreeDict <EOL> p = defaults ( ) <EOL> p . process_defaults . add_to_a = <NUM_LIT:0> <EOL> @ preset <EOL> def add_to_a ( p , a = <NUM_LIT:1> ) : <EOL> p . process_defaults . add_to_a = a <EOL> @ pmodule <EOL> class Process ( PModule ) : <EOL> p = defaults ( ) <EOL> p . add_to_x = <NUM_LIT:0> <EOL> p . return_value = '<STR_LIT:x>' <EOL> @ preset <EOL> def addToX ( p , y = <NUM_LIT:1> ) : <EOL> p . add_to_x = y <EOL> @ preset <EOL> def returnValue ( p , value = '<STR_LIT:x>' ) : <EOL> p . return_value = value <EOL> result_dependencies = "<STR_LIT:data>" <EOL> parameter_dependencies = "<STR_LIT>" <EOL> def run ( self ) : <EOL> if self . p . return_value == '<STR_LIT:x>' : <EOL> return self . results . data . x + self . p . add_to_x <EOL> elif self . p . return_value == '<STR_LIT:a>' : <EOL> return self . results . data . a + self . parameters . process_defaults . add_to_a <EOL> elif self . p . return_value == '<STR_LIT:b>' : <EOL> return self . results . data . b <EOL> else : <EOL> assert False </s>
