def execute(args: typing.NamedTuple): actions = dict( cluster=cluster.execute, init=init.execute ) func = actions[args.action] func(args)