code: def _test__native_dist_model_spawn(
      backend,
      num_workers_per_machine,
      device,
      init_method=None,
      **spawn_kwargs,
  ):
      kwargs_dict = {}
      for key in ["master_addr", "master_port"]:
          if key in spawn_kwargs:
              kwargs_dict[key] = spawn_kwargs[key]
  
      _NativeDistModel.spawn(
          _test_dist_spawn_fn,
          args=(backend, num_workers_per_machine, device),
          kwargs_dict=kwargs_dict,
          backend=backend,
          nproc_per_node=num_workers_per_machine,
          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 24 for calling a global function with example usage: _test__native_dist_model_spawn(backend, num_workers_per_machine, device, init_method) without return types