Using Python dataclasses to simplify managing class objects