def teardown(self):
    pcs = self.scheduler.periodic_callbacks
    if ('stealing' in pcs):
        pcs['stealing'].stop()
        del pcs['stealing']
def teardown(self):
    pcs = self.scheduler.periodic_callbacks
    if ('stealing' in pcs):
        pcs['stealing'].stop()
        del pcs['stealing']