code: def test_mixed_imports_unified():
      from lightning.pytorch.utilities.compile import (
          _maybe_unwrap_optimized as new_unwrap,
      )
      from lightning.pytorch.utilities.model_helpers import (
          is_overridden as new_is_overridden,
      )
      from pytorch_lightning.callbacks import (
          EarlyStopping as OldEarlyStopping,
      )
      from pytorch_lightning.demos.boring_classes import (
          BoringModel as OldBoringModel,
      )
  
      model = OldBoringModel()
      with pytest.raises(
          TypeError,
          match=r"`pytorch_lightning` object \(BoringModel\) to a `lightning.pytorch`",
      ):
          new_unwrap(model)
  
      with pytest.raises(
          TypeError,
          match=r"`pytorch_lightning` object \(EarlyStopping\) to a `lightning.pytorch`",
      ):
          new_is_overridden("on_fit_start", OldEarlyStopping("foo"))
  
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 2 for calling a global function with example usage: test_mixed_imports_unified() without return types