code: def __init__(
      self,
      expected_end_epoch: int,
      early_stop_on_train: bool,
      dist_diverge_epoch: Optional[int] = None,
  ):
      super().__init__()
      self.expected_end_epoch = expected_end_epoch
      self.early_stop_on_train = early_stop_on_train
      self.dist_diverge_epoch = dist_diverge_epoch
  
imports: import logging
  import math
  import os
  import pickle
  from typing import List, Optional
  from unittest import mock
  from unittest.mock import Mock
  import cloudpickle
  import pytest
  import torch
  from lightning.pytorch import Trainer, seed_everything
  from lightning.pytorch.callbacks import EarlyStopping, ModelCheckpoint
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from tests_pytorch.helpers.datamodules import ClassifDataModule
  from tests_pytorch.helpers.runif import RunIf
  from tests_pytorch.helpers.simple_models import ClassificationModel
label_desc: Use image node_id 1 to create a new EarlyStoppingModel object from inherited base classes: BoringModel with example: obj = EarlyStoppingModel(expected_end_epoch, early_stop_on_train, dist_diverge_epoch)