code: def __init__(self, state):
      self.state = state
  
file_path: pytorch-lightning/tests/tests_pytorch/callbacks/test_callbacks.py
imports: from pathlib import Path
  from re import escape
  from unittest.mock import Mock
  import pytest
  from lightning.pytorch import Callback, Trainer
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning_utilities.test.warning import no_warning_call
label_desc: Use image node_id 1 to create a new OldStatefulCallback object from inherited base classes: Callback with example: obj = OldStatefulCallback(state)