code: def test_integration(self):
      train_gen = some_data_generator(20)
      valid_gen = some_data_generator(20)
      earlystopper = EarlyStopping(
          monitor="val_loss", min_delta=0, patience=2, verbose=False
      )
  
      model = Model(
          self.pytorch_network, self.optimizer, self.loss_function
      )
      model.fit_generator(
          train_gen,
          valid_gen,
          epochs=10,
          steps_per_epoch=5,
          callbacks=[earlystopper],
      )
  
imports: import unittest
  import torch
  import torch.nn
  from poutyne import Callback, EarlyStopping, Metric, Model
  from tests.framework.base import CaptureOutputBase
  from tests.framework.tools import some_data_generator
label_desc: Use image node_id 2 for calling the EarlyStoppingTest obj's underlying member method code with example usage: obj.test_integration() without return types