Nano Dimension Interview Question

Implement a hierarchal task executer class in python