code: def test_verify_lightning_version(monkeypatch):
      monkeypatch.setattr(lightning_utils, "__version__", "0.0.1")
      monkeypatch.setattr(
          lightning_utils, "_fetch_latest_version", lambda _: "0.0.2"
      )
  
      # Not latest version
      with pytest.raises(
          Exception,
          match="You need to use the latest version of Lightning",
      ):
          _verify_lightning_version()
  
      # Latest version
      monkeypatch.setattr(lightning_utils, "__version__", "0.0.1")
      monkeypatch.setattr(
          lightning_utils, "_fetch_latest_version", lambda _: "0.0.1"
      )
      _verify_lightning_version()
  
file_path: pytorch-lightning/tests/tests_app/utilities/packaging/test_lightning_utils.py
imports: import glob
  import os
  from unittest import mock
  import pytest
  from lightning.app.testing.helpers import _RunIf
  from lightning.app.utilities.git import check_github_repository, get_dir_name
  from lightning.app.utilities.packaging import lightning_utils
  from lightning.app.utilities.packaging.lightning_utils import _prepare_lightning_wheels_and_requirements, _verify_lightning_version, get_dist_path_if_editable_install
  from lightning_utilities.core.imports import module_available
label_desc: Use image node_id 4 for calling a global function with example usage: test_verify_lightning_version(monkeypatch) without return types