code: def test_distrib_hvd(gloo_hvd_executor):
      device = torch.device(
          "cpu" if not torch.cuda.is_available() else "cuda"
      )
      nproc = (
          4
          if not torch.cuda.is_available()
          else torch.cuda.device_count()
      )
  
      gloo_hvd_executor(
          _test_distrib_binary_and_multilabel_inputs,
          (device,),
          np=nproc,
          do_init=True,
      )
      gloo_hvd_executor(
          _test_distrib_integration_binary_input,
          (device,),
          np=nproc,
          do_init=True,
      )
  
imports: import os
  from unittest.mock import patch
  import pytest
  import sklearn
  import torch
  from sklearn.metrics import average_precision_score
  import ignite.distributed
  from ignite.contrib.metrics import AveragePrecision
  from ignite.engine import Engine
  from ignite.exceptions import NotComputableError
label_desc: Use image node_id 14 for calling a global function with example usage: test_distrib_hvd(gloo_hvd_executor) without return types