from collections import namedtuple HandlerInput = namedtuple( typename="HandlerInput", field_names=[ "text", "remaining_attempts", "button_label", ], ) HandlerOutput = namedtuple( typename="HandlerOutput", field_names=[ "text", "remaining_attempts", "button_label", ], )