code: def _assert_model(model, true_conf):
      assert model.device() == torch.device(true_conf["device"])
      assert model.get_local_rank() == true_conf["local_rank"]
      assert model.get_rank() == true_conf["rank"]
      assert model.get_world_size() == true_conf["world_size"]
  
      assert model.get_node_rank() == true_conf["node_index"]
      assert model.get_nnodes() == true_conf["nnodes"]
      assert model.get_nproc_per_node() == true_conf["nproc_per_node"]
  
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 7 for calling a global function with example usage: _assert_model(model, true_conf) without return types