code: def _test_dist_spawn_fn(local_rank, backend, world_size, device):
      from ignite.distributed.utils import _model
  
      assert hvd.rank() > -1
  
      assert isinstance(
          _model, _HorovodDistModel
      ), f"{type(_model)} vs _HorovodDistModel"
  
      assert _model.get_local_rank() == local_rank
      assert _model.get_world_size() == world_size
      assert _model.backend() == backend
  
      if "cuda" in device:
          assert _model.device() == torch.device(
              f"{device}:{local_rank}"
          )
      else:
          assert _model.device() == torch.device(device)
  
file_path: ignite/tests/ignite/distributed/comp_models/test_horovod.py
imports: import pytest
  import torch
  from ignite.distributed.comp_models import has_hvd_support
label_desc: Use image node_id 15 for calling a global function with example usage: _test_dist_spawn_fn(local_rank, backend, world_size, device) without return types