code: def test_multiclass_wrong_inputs():
      acc = Accuracy()
  
      with pytest.raises(ValueError):
          # incompatible shapes
          acc.update(
              (
                  torch.rand(10, 5, 4),
                  torch.randint(0, 2, size=(10,)).long(),
              )
          )
  
      with pytest.raises(ValueError):
          # incompatible shapes
          acc.update(
              (
                  torch.rand(10, 5, 6),
                  torch.randint(0, 5, size=(10, 5)).long(),
              )
          )
  
      with pytest.raises(ValueError):
          # incompatible shapes
          acc.update(
              (
                  torch.rand(10),
                  torch.randint(0, 5, size=(10, 5, 6)).long(),
              )
          )
  
imports: import os
  import pytest
  import torch
  from packaging.version import Version
  from sklearn.metrics import accuracy_score
  import ignite.distributed
  from ignite.engine import Engine
  from ignite.exceptions import NotComputableError
  from ignite.metrics import Accuracy
label_desc: Use image node_id 7 for calling a global function with example usage: test_multiclass_wrong_inputs() without return types