code: def _test__hvd_dist_model_warning_index_less_localrank():
      assert torch.cuda.is_available()
      assert _HorovodDistModel.create_from_context() is None
  
      hvd.init()
      # We deliberately incorrectly set cuda device to 0
      torch.cuda.set_device(0)
  
      model = _HorovodDistModel.create_from_context()
      assert isinstance(
          model, _HorovodDistModel
      ), f"{type(model)} vs _HorovodDistModel"
  
      if hvd.local_rank() == 1:
          with pytest.warns(
              UserWarning,
              match=r"Current device index is less than current local rank.",
          ):
              model.device()
  
      hvd.shutdown()
  
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 13 for calling a global function with example usage: _test__hvd_dist_model_warning_index_less_localrank() without return types