code: def test_horovod(np, example):
      if "cuda" in example and np > torch.cuda.device_count():
          pytest.skip()
      horovodrun = (
          "horovodrun -np {} --mpi-args=--oversubscribe".format(np)
      )
      logger.info(
          "Running:\n{} python examples/{}".format(horovodrun, example)
      )
      example = example.split()
      filename, args = example[0], example[1:]
      filename = os.path.join(EXAMPLES_DIR, filename)
      check_call(horovodrun.split() + [sys.executable, filename] + args)
  
file_path: pyro/tests/test_examples.py
imports: import logging
  import os
  import sys
  from subprocess import check_call
  import pytest
  import torch
  from tests.common import EXAMPLES_DIR, requires_cuda, requires_funsor, requires_horovod, requires_lightning, xfail_param
label_desc: Use image node_id 6 for calling a global function with example usage: test_horovod(np, example) without return types