code: def _test__native_dist_model_create_from_context_dist(
      local_rank, rank, world_size, true_backend, true_device
  ):
      assert _NativeDistModel.create_from_context() is None
  
      dist.init_process_group(
          true_backend,
          "tcp://0.0.0.0:2222",
          world_size=world_size,
          rank=rank,
      )
      dist.barrier()
      if torch.cuda.is_available():
          torch.cuda.set_device(local_rank)
  
      true_conf = {
          "device": true_device,
          "local_rank": local_rank,
          "rank": rank,
          "world_size": world_size,
          "node_index": 0,
          "nnodes": 1,
          "nproc_per_node": world_size,
      }
  
      _test__native_dist_model_create_from_context_env_local_rank(
          true_conf
      )
      _test__native_dist_model_create_from_context_set_local_rank(
          true_conf
      )
  
      dist.destroy_process_group()
  
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 15 for calling a global function with example usage: _test__native_dist_model_create_from_context_dist(local_rank, rank, world_size, true_backend, true_device) without return types