code: def _test_distrib_accumulator_device(device):
      metric_devices = [torch.device("cpu")]
      if device.type != "xla":
          metric_devices.append(idist.device())
      for metric_device in metric_devices:
          cm = MultiLabelConfusionMatrix(
              num_classes=3, device=metric_device
          )
          assert cm._device == metric_device
          assert (
              cm.confusion_matrix.device == metric_device
          ), f"{type(cm.confusion_matrix.device)}:{cm._num_correct.device} vs {type(metric_device)}:{metric_device}"
  
          y_true, y_pred = get_y_true_y_pred()
          cm.update((torch.tensor(y_pred), torch.tensor(y_true)))
  
          assert (
              cm.confusion_matrix.device == metric_device
          ), f"{type(cm.confusion_matrix.device)}:{cm._num_correct.device} vs {type(metric_device)}:{metric_device}"
  
file_path: ignite/tests/ignite/metrics/test_multilabel_confusion_matrix.py
imports: import numpy
  import pytest
  import torch
  from sklearn.metrics import multilabel_confusion_matrix
  import ignite.distributed
  from ignite.exceptions import NotComputableError
  from ignite.metrics.multilabel_confusion_matrix import MultiLabelConfusionMatrix
label_desc: Use image node_id 7 for calling a global function with example usage: _test_distrib_accumulator_device(device) without return types