@contextlib.contextmanager
def debug_timing(self, task):
    t0 = time.time()
    (yield)
    self.logger.debug(f'{task} complete ({{:.1f}} seconds)', (time.time() - t0))
@contextlib.contextmanager
def debug_timing(self, task):
    t0 = time.time()
    (yield)
    self.logger.debug(f'{task} complete ({{:.1f}} seconds)', (time.time() - t0))