code: def distributed_context_single_node_gloo(local_rank, world_size):
      from datetime import timedelta
  
      if sys.platform.startswith("win"):
          temp_file = tempfile.NamedTemporaryFile(delete=False)
          # can't use backslashes in f-strings
          backslash = "\\"
          init_method = (
              f'file:///{temp_file.name.replace(backslash, "/")}'
          )
      else:
          free_port = _setup_free_port(local_rank)
          init_method = f"tcp://localhost:{free_port}"
          temp_file = None
  
      dist_info = {
          "backend": "gloo",
          "world_size": world_size,
          "rank": local_rank,
          "init_method": init_method,
          "timeout": timedelta(seconds=60),
      }
      yield _create_dist_context(dist_info, local_rank)
      _destroy_dist_context()
      if temp_file:
          temp_file.close()
  
imports: import functools
  import os
  import shutil
  import sys
  import tempfile
  import time
  from pathlib import Path
  import pytest
  import torch
  import torch.distributed
  import ignite.distributed
label_desc: Use image node_id 13 for calling a global function with example usage: distributed_context_single_node_gloo(local_rank, world_size) without return types