code: def on_valid_end(self, trainer, results):
      if results["acc#acc"] == 1:
          raise KeyboardInterrupt()
  
file_path: fastNLP/tests/models/torch/test_seq2seq_generator.py
imports: import pytest
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP import Vocabulary, DataSet
  from fastNLP import Trainer, Accuracy
  from fastNLP import Callback, TorchDataLoader
label_desc: Use image node_id 2 for calling the ExitCallback obj's underlying member method code with example usage: obj.on_valid_end(trainer, results) without return types