code: def restore(self, hidden_state):
          
          for callback in self.callbacks:
              callback.load_state_dict(self, hidden_state)
  
          if 'optimizer' in hidden_state:
              self.optimizer_initial_state = hidden_state['optimizer']
docs: Restore any state from checkpoint - currently not implemented but possible to do so in the future