code: def test__native_dist_model_spawn_nccl(init_method, dirname):
      spawn_kwargs = {}
  
      if init_method == "FILE":
          init_method = f"file://{dirname}/shared"
      elif init_method == "CUSTOM_ADDR_PORT":
          init_method = None
          spawn_kwargs["master_addr"] = "0.0.0.0"
          spawn_kwargs["master_port"] = 2345
  
      nproc = torch.cuda.device_count()
      _test__native_dist_model_spawn(
          "nccl",
          num_workers_per_machine=nproc,
          device="cuda",
          init_method=init_method,
          **spawn_kwargs,
      )
  
imports: import os
  import pytest
  import torch
  import torch.distributed
  from ignite.distributed.comp_models import has_native_dist_support
label_desc: Use image node_id 26 for calling a global function with example usage: test__native_dist_model_spawn_nccl(init_method, dirname) without return types