code: def test_multi_node_examples(_, app_name, monkeypatch):
      # note: this test will fail locally:
      # * if you installed `lightning.app`, then the examples need to be
      #   rewritten to use `lightning.app` imports (CI does this)
      # * if you installed `lightning`, then the imports in this file and mocks
      #   need to be changed to use `lightning`.
      monkeypatch.chdir(os.path.join(_PATH_EXAMPLES, "multi_node"))
      command_line = [
          app_name,
          "--blocking",
          "False",
          "--open-ui",
          "False",
          "--setup",
      ]
      result = application_testing(
          LightningTestMultiNodeApp, command_line
      )
      assert result.exit_code == 0
  
file_path: pytorch-lightning/tests/integrations_app/public/test_multi_node.py
imports: import os
  from unittest import mock
  import pytest
  from lightning.app.testing.helpers import _RunIf
  from lightning.app.testing.testing import LightningTestApp, application_testing
  from lightning_utilities.core.imports import package_available
  from integrations_app.public import _PATH_EXAMPLES
label_desc: Use image node_id 1 for calling a global function with example usage: test_multi_node_examples(_, app_name, monkeypatch) without return types