def METHOD_NAME(self):
    """A context manager to disable gradient synchronization."""
    old_accumulate_grads = self.accumulate_grads
    self.accumulate_grads = True
    yield
    self.accumulate_grads = old_accumulate_grads