code: def test_migrate_model_checkpoint_early_stopping(
      old_checkpoint, new_checkpoint
  ):
      _set_version(old_checkpoint, "0.9.0")
      _set_legacy_version(new_checkpoint, "0.9.0")
      _set_version(new_checkpoint, pl.__version__)
      updated_checkpoint, _ = migrate_checkpoint(
          old_checkpoint, target_version="1.0.0"
      )
      assert updated_checkpoint == old_checkpoint == new_checkpoint
      assert _get_version(updated_checkpoint) == pl.__version__
  
imports: from unittest.mock import ANY, MagicMock
  import lightning.pytorch
  import pytest
  import torch
  from lightning.fabric.utilities.warnings import PossibleUserWarning
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks import EarlyStopping, ModelCheckpoint
  from lightning.pytorch.demos.boring_classes import BoringModel, ManualOptimBoringModel
  from lightning.pytorch.utilities.migration import migrate_checkpoint
  from lightning.pytorch.utilities.migration.utils import _get_version, _set_legacy_version, _set_version
label_desc: Use image node_id 1 for calling a global function with example usage: test_migrate_model_checkpoint_early_stopping(old_checkpoint, new_checkpoint) without return types