code: def test_configure_launcher_create_processes_externally():
      class MyClusterEnvironment(ClusterEnvironment):
          @property
          def creates_processes_externally(self):
              return True
  
          @property
          def main_address(self):
              return ""
  
          @property
          def main_port(self):
              return 8080
  
          @staticmethod
          def detect():
              return True
  
          def world_size(self):
              return 1
  
          def set_world_size(self):
              pass
  
          def global_rank(self):
              return 0
  
          def set_global_rank(self):
              pass
  
          def local_rank(self):
              return 0
  
          def node_rank(self):
              return 0
  
      ddp_strategy = DDPStrategy(
          cluster_environment=MyClusterEnvironment(),
          parallel_devices=[torch.device("cpu")],
      )
      assert ddp_strategy.launcher is None
      ddp_strategy._configure_launcher()
      assert isinstance(
          ddp_strategy.launcher, _SubprocessScriptLauncher
      )
  
      ddp_strategy.launcher._call_children_scripts = Mock()
      launch_fn = Mock()
      ddp_strategy.launcher.launch(launch_fn)
      ddp_strategy.launcher._call_children_scripts.assert_not_called()
      launch_fn.assert_called_once()
  
imports: import os
  from unittest import mock
  from unittest.mock import Mock
  import lightning.pytorch
  import pytest
  import torch
  from lightning.fabric.plugins.environments import ClusterEnvironment, LightningEnvironment
  from lightning.fabric.utilities.distributed import _distributed_is_initialized
  from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_0
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks import Callback, EarlyStopping
  from lightning.pytorch.demos.boring_classes import BoringDataModule, BoringModel
  from lightning.pytorch.strategies import DDPStrategy
  from lightning.pytorch.strategies.launchers import _SubprocessScriptLauncher
  from lightning.pytorch.strategies.launchers.multiprocessing import _MultiProcessingLauncher
  from lightning.pytorch.trainer import seed_everything
  from torch.distributed.optim import ZeroRedundancyOptimizer
  from torch.multiprocessing import ProcessRaisedException
  from torch.nn.parallel.distributed import DistributedDataParallel
  import tests_pytorch.helpers.pipelines
  from tests_pytorch.helpers.datamodules import ClassifDataModule
  from tests_pytorch.helpers.runif import RunIf
  from tests_pytorch.helpers.simple_models import ClassificationModel
label_desc: Use image node_id 14 for calling a global function with example usage: test_configure_launcher_create_processes_externally() and returns: True, str, int, True, int, int, int, int