refactor to make a reusable Register.get_task_cls
Merge pull request #463 from spotify/ulzha/range

refactor to make a reusable Register.get_task_cls