code: def on_train_epoch_start(
      self, trainer: "pl.Trainer", pl_module: "pl.LightningModule"
  ) -> None:
      self._count += 1
      if self._count >= self.limit:
          trainer.should_stop = True
  
imports: import glob
  import os
  import sys
  from unittest.mock import patch
  import lightning.pytorch
  import pytest
  import torch
  from lightning.pytorch import Callback, Trainer
  from tests_pytorch import _PATH_LEGACY
  from tests_pytorch.helpers.datamodules import ClassifDataModule
  from tests_pytorch.helpers.runif import RunIf
  from tests_pytorch.helpers.simple_models import ClassificationModel
  from tests_pytorch.helpers.threading import ThreadExceptionHandler
label_desc: Use image node_id 2 for calling the LimitNbEpochs obj's underlying member method code with example usage: obj.on_train_epoch_start(trainer, pl_module) without return types