code: def test_without_nan_during_train_does_not_stop_training(self):
      terminate_on_nan = TerminateOnNaN()
      train_gen = some_data_generator(20)
      valid_gen = some_data_generator(20)
  
      self.model.fit_generator(
          train_gen,
          valid_gen,
          epochs=10,
          steps_per_epoch=5,
          callbacks=[terminate_on_nan],
      )
      self.assertFalse(self.model.stop_training)
  
file_path: poutyne/tests/framework/callbacks/test_terminate_on_nan.py
imports: import numpy
  import torch
  import torch.nn
  from poutyne import Model, TerminateOnNaN
  from tests.framework.base import CaptureOutputBase
  from tests.framework.tools import some_data_generator
label_desc: Use image node_id 4 for calling the TerminateOnNaNTest obj's underlying member method code with example usage: obj.test_without_nan_during_train_does_not_stop_training() without return types