code: def test_trainer_torch_without_evaluator():
      @Trainer.on(
          Event.on_train_epoch_begin(every=10),
          marker="test_trainer_other_things",
      )
      def fn1(trainer):
          pass
  
      @Trainer.on(
          Event.on_train_batch_begin(every=10),
          marker="test_trainer_other_things",
      )
      def fn2(trainer, batch, indices):
          pass
  
      with pytest.raises(BaseException):
  
          @Trainer.on(
              Event.on_train_batch_begin(every=10),
              marker="test_trainer_other_things",
          )
          def fn3(trainer, batch):
              pass
  
imports: import pytest
  from fastNLP.core.controllers.trainer import Trainer
  from fastNLP.core.callbacks import Event
  from tests.helpers.utils import magic_argv_env_context
label_desc: Use image node_id 1 for calling a global function with example usage: test_trainer_torch_without_evaluator() without return types