code: def test_when_early_stopping_patience_is_none_then_early_stopping_callback_not_created():
      from lightning.pytorch.callbacks import EarlyStopping
  
      model = SimpleFeedForwardModel(
          hyperparameters={
              "early_stopping_patience": None,
              **DUMMY_HYPERPARAMETERS,
          }
      )
      received_trainer_kwargs = catch_trainer_kwargs(model)
      es_callbacks = [
          cb
          for cb in received_trainer_kwargs["callbacks"]
          if isinstance(cb, EarlyStopping)
      ]
      assert len(es_callbacks) == 0
  
imports: from unittest import mock
  import numpy
  import pytest
  from gluonts.model.predictor import Predictor
  from autogluon.timeseries.models.gluonts import DeepARModel, DLinearModel, PatchTSTModel, SimpleFeedForwardModel, TemporalFusionTransformerModel, WaveNetModel
  from autogluon.timeseries.utils.features import TimeSeriesFeatureGenerator
  from ..common import DATAFRAME_WITH_COVARIATES, DATAFRAME_WITH_STATIC, DUMMY_TS_DATAFRAME
label_desc: Use image node_id 20 for calling a global function with example usage: test_when_early_stopping_patience_is_none_then_early_stopping_callback_not_created() without return types