'Borrows optimizer from a shared module. Used in bucketing, where exactly the same
optimizer (esp. kvstore) is used.
Parameters
shared_module : Module'

def borrow_optimizer(self, shared_module):

    assert shared_module.optimizer_initialized
    self._optimizer = shared_module._optimizer
    self._kvstore = shared_module._kvstore
    self._update_on_kvstore = shared_module._update_on_kvstore
    self._updater = shared_module._updater
    self.optimizer_initialized = True
