code: def test_import_lightning_multiprocessing_start_method_not_set():
      """Regression test for avoiding the lightning import to set the multiprocessing context."""
      package_name = (
          "pytorch_lightning"
          if "lightning.pytorch" == "pytorch_lightning"
          else "lightning"
      )
  
      # The following would fail with "context has already been set"
      code = dedent(
          f"""
          import sys
          import multiprocessing as mp
  
          import {package_name}
          mp.set_start_method("spawn")
          """
      )
      # run in complete isolation
      assert subprocess.call([sys.executable, "-c", code]) == 0
  
file_path: pytorch-lightning/tests/tests_pytorch/utilities/test_imports.py
imports: import importlib
  import subprocess
  import sys
  from textwrap import dedent
  from unittest import mock
  import pytest
  from lightning.pytorch.utilities.imports import _OMEGACONF_AVAILABLE
  from lightning_utilities.core.imports import RequirementCache
  from torch.distributed import is_available
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 7 for calling a global function with example usage: test_import_lightning_multiprocessing_start_method_not_set() without return types