code: def test_cli_through_lightning_entry_point():
      result = subprocess.run(
          "lightning run model --help",
          capture_output=True,
          text=True,
          shell=True,
      )
      if not ModuleAvailableCache("lightning.app"):
          message = (
              "The `lightning` command requires additional dependencies"
          )
          assert message in result.stdout or message in result.stderr
          assert result.returncode != 0
      else:
          message = "Usage: lightning run model [OPTIONS] SCRIPT [SCRIPT_ARGS]"
          assert message in result.stdout or message in result.stderr
  
imports: import contextlib
  import os
  import subprocess
  from io import StringIO
  from unittest import mock
  from unittest.mock import Mock
  import pytest
  import torch.distributed.run
  from lightning.fabric.cli import _get_supported_strategies, _run_model
  from lightning_utilities.core.imports import ModuleAvailableCache
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 13 for calling a global function with example usage: test_cli_through_lightning_entry_point() without return types