def process_value(name, value):
 action = ACTIONS.get(name)
 if (not action):
  return value
 if callable(action.type):
  return action.type(value)
 if action.const:
  return bool(int(value))
 return value

def process_value ( name , value ) : action = ACTIONS . get ( name ) if ( not action ) : return value if callable ( action . type ) : return action . type ( value ) if action . const : return bool ( int ( value ) ) return value
compile option value .