code: def test_zero_case_in_multiclass():
      """Cases where the denominator in the matthews corrcoef is 0, the score should return 0."""
      # Example where neither 1 or 2 is present in the target tensor
      out = multiclass_matthews_corrcoef(
          torch.tensor([0, 1, 2]), torch.tensor([0, 0, 0]), 3
      )
      assert out == 0.0
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from sklearn.metrics import matthews_corrcoef
  from torchmetrics.classification.matthews_corrcoef import BinaryMatthewsCorrCoef, MatthewsCorrCoef, MulticlassMatthewsCorrCoef, MultilabelMatthewsCorrCoef
  from torchmetrics.functional.classification.matthews_corrcoef import binary_matthews_corrcoef, multiclass_matthews_corrcoef, multilabel_matthews_corrcoef
  from torchmetrics.metric import Metric
  from unittests import NUM_CLASSES, THRESHOLD
  from unittests.classification.inputs import _binary_cases, _multiclass_cases, _multilabel_cases
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester, inject_ignore_index, remove_ignore_index
label_desc: Use image node_id 4 for calling a global function with example usage: test_zero_case_in_multiclass() without return types