code: def _hvd_task_with_init(func, args):
      import horovod.torch as hvd
  
      hvd.init()
      lrank = hvd.local_rank()
      if torch.cuda.is_available():
          torch.cuda.set_device(lrank)
  
      func(*args)
  
      # Added a sleep to avoid flaky failures on circle ci
      # Sometimes a rank is terminated before final collective
      # op is finished.
      # https://github.com/pytorch/ignite/pull/2357
      time.sleep(2)
  
      hvd.shutdown()
  
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 23 for calling a global function with example usage: _hvd_task_with_init(func, args) without return types