code: def test_is_overridden():
      # edge cases
      assert not is_overridden("whatever", None)
      with pytest.raises(ValueError, match="Expected a parent"):
          is_overridden("whatever", object())
      model = BoringModel()
      assert not is_overridden("whatever", model)
      assert not is_overridden(
          "whatever", model, parent=LightningDataModule
      )
      # normal usage
      assert is_overridden("training_step", model)
      datamodule = BoringDataModule()
      assert is_overridden("train_dataloader", datamodule)
  
file_path: pytorch-lightning/tests/tests_pytorch/utilities/test_model_helpers.py
imports: import logging
  import pytest
  import torch.nn
  from lightning.pytorch import LightningDataModule
  from lightning.pytorch.demos.boring_classes import BoringDataModule, BoringModel
  from lightning.pytorch.utilities.model_helpers import _ModuleMode, _restricted_classmethod, is_overridden
  from lightning_utilities import module_available
label_desc: Use image node_id 1 for calling a global function with example usage: test_is_overridden() without return types