code: def test_simple_ND_input():
      num_iters = 5
      num_samples = 100
      num_classes = 10
      torch.manual_seed(0)
  
      size_3d = 4
      for _ in range(num_iters):  # 3D tests
          target = torch.randint(
              0, 2, size=(num_samples, num_classes, size_3d)
          )
          prediction = torch.randint(
              0, 2, size=(num_samples, num_classes, size_3d)
          )
          mlcm = MultiLabelConfusionMatrix(
              num_classes, normalized=False
          )
          mlcm.update([prediction, target])
          ignite_CM = mlcm.compute().numpy()
          target_reshaped = target.permute(0, 2, 1).reshape(
              size_3d * num_samples, num_classes
          )
          prediction_reshaped = prediction.permute(0, 2, 1).reshape(
              size_3d * num_samples, num_classes
          )
          sklearn_CM = multilabel_confusion_matrix(
              target_reshaped.numpy(), prediction_reshaped.numpy()
          )
          assert np.all(
              sklearn_CM.astype(np.int64) == ignite_CM.astype(np.int64)
          )
  
      size_4d = 4
      for _ in range(num_iters):  # 4D tests
          target = torch.randint(
              0, 2, size=(num_samples, num_classes, size_3d, size_4d)
          )
          prediction = torch.randint(
              0, 2, size=(num_samples, num_classes, size_3d, size_4d)
          )
          mlcm = MultiLabelConfusionMatrix(
              num_classes, normalized=False
          )
          mlcm.update([prediction, target])
          ignite_CM = mlcm.compute().numpy()
          target_reshaped = target.permute(0, 2, 3, 1).reshape(
              size_3d * size_4d * num_samples, num_classes
          )
          prediction_reshaped = prediction.permute(0, 2, 3, 1).reshape(
              size_3d * size_4d * num_samples, num_classes
          )
          sklearn_CM = multilabel_confusion_matrix(
              target_reshaped.numpy(), prediction_reshaped.numpy()
          )
          assert np.all(
              sklearn_CM.astype(np.int64) == ignite_CM.astype(np.int64)
          )
  
      size_5d = 4
      for _ in range(num_iters):  # 5D tests
          target = torch.randint(
              0,
              2,
              size=(
                  num_samples,
                  num_classes,
                  size_3d,
                  size_4d,
                  size_5d,
              ),
          )
          prediction = torch.randint(
              0,
              2,
              size=(
                  num_samples,
                  num_classes,
                  size_3d,
                  size_4d,
                  size_5d,
              ),
          )
          mlcm = MultiLabelConfusionMatrix(
              num_classes, normalized=False
          )
          mlcm.update([prediction, target])
          ignite_CM = mlcm.compute().numpy()
          target_reshaped = target.permute(0, 2, 3, 4, 1).reshape(
              size_3d * size_4d * size_5d * num_samples, num_classes
          )
          prediction_reshaped = prediction.permute(
              0, 2, 3, 4, 1
          ).reshape(
              size_3d * size_4d * size_5d * num_samples, num_classes
          )
          sklearn_CM = multilabel_confusion_matrix(
              target_reshaped.numpy(), prediction_reshaped.numpy()
          )
          assert np.all(
              sklearn_CM.astype(np.int64) == ignite_CM.astype(np.int64)
          )
  
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 9 for calling a global function with example usage: test_simple_ND_input() without return types