code: def test_native_distrib_single_node_launch_tool_gloo(
      init_method, get_fixed_dirname, local_rank, world_size
  ):
      from datetime import timedelta
  
      timeout = timedelta(seconds=20)
  
      if init_method == "FILE":
          init_method = f"file://{get_fixed_dirname('native_distrib_single_node_launch_tool_gloo')}/shared"
  
      device = torch.device(
          f"cuda:{local_rank}" if torch.cuda.is_available() else "cpu"
      )
      _test_native_distrib_single_node_launch_tool(
          "gloo",
          device,
          local_rank,
          world_size,
          timeout=timeout,
          init_method=init_method,
      )
  
imports: import os
  import pytest
  import torch
  import torch.distributed
  from packaging.version import Version
  import ignite.distributed
  from ignite.distributed.utils import has_native_dist_support
  from tests.ignite.distributed.utils import _test_distrib__get_max_length, _test_distrib_all_gather, _test_distrib_all_gather_group, _test_distrib_all_reduce, _test_distrib_all_reduce_group, _test_distrib_barrier, _test_distrib_broadcast, _test_distrib_config, _test_distrib_new_group, _test_distrib_one_rank_only, _test_distrib_one_rank_only_with_engine, _test_sync
label_desc: Use image node_id 2 for calling a global function with example usage: test_native_distrib_single_node_launch_tool_gloo(init_method, get_fixed_dirname, local_rank, world_size) without return types