code: def __init__(self, nb: int):
      self.limit = nb
      self._count = 0
  
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 1 to create a new LimitNbEpochs object from inherited base classes: Callback with example: obj = LimitNbEpochs(nb)