code: def __call__(
      self,
      main_address: str,
      main_port: int,
      num_nodes: int,
      node_rank: int,
  ):
      import torch
  
      with self.enable_spawn():
          nprocs = (
              torch.cuda.device_count()
              if torch.cuda.is_available()
              else 1
          )
          queue = (
              self.delta_queue
              if isinstance(self.delta_queue, MultiProcessQueue)
              else self.delta_queue.to_dict()
          )
          torch.multiprocessing.spawn(
              self.dispatch_run,
              args=(
                  self.__class__,
                  self.work,
                  queue,
                  main_address,
                  main_port,
                  num_nodes,
                  node_rank,
                  nprocs,
              ),
              nprocs=nprocs,
          )
  
file_path: pytorch-lightning/src/lightning/app/components/multi_node/pytorch_spawn.py
imports: from typing import Any, Callable, Protocol, Type, runtime_checkable
  from lightning.app.components.multi_node.base import MultiNode
  from lightning.app.core.queues import MultiProcessQueue
  from lightning.app.core.work import LightningWork
  from lightning.app.utilities.packaging.cloud_compute import CloudCompute
  from lightning.app.utilities.proxies import WorkRunExecutor, WorkStateObserver, _proxy_setattr, unwrap
label_desc: Use image node_id 1 for calling the _PyTorchSpawnRunExecutor obj's underlying member method code with example usage: obj.__call__(main_address, main_port, num_nodes, node_rank) without return types