def do(self, which_callback, *args):
        if (which_callback == 'before_training' or
                which_callback is 'on_resumption'):
            self.worker.init_shared_params(self.main_loop.model.parameters)
        elif which_callback == 'after_training':
            self.worker.send_req('done')
        else:
            self.worker.sync_params()
dataset/ETHPy150Open mila-udem/blocks-extras/blocks_extras/extensions/synchronization.py/Synchronize.do/operator `==` -> `is`