from dataclasses import dataclass @dataclass class Move: x: int y: int @dataclass class Idle: pass @dataclass class NA: pass Action = Move | Idle | NA action_timing = { Move: 50, Idle: 10, NA: 1 }