code: def test_error_on_different_shape(
      metric_class=ShortTimeObjectiveIntelligibility,
  ):
      """Test that error is raised on different shapes of input."""
      metric = metric_class(16000)
      with pytest.raises(
          RuntimeError,
          match="Predictions and targets are expected to have the same shape",
      ):
          metric(torch.randn(100), torch.randn(50))
  
imports: from functools import partial
  import pytest
  import torch
  from pystoi import stoi
  from scipy.io import wavfile
  from torch import Tensor
  from torchmetrics.audio import ShortTimeObjectiveIntelligibility
  from torchmetrics.functional.audio import short_time_objective_intelligibility
  from unittests import _Input
  from unittests.audio import _SAMPLE_AUDIO_SPEECH, _SAMPLE_AUDIO_SPEECH_BAB_DB
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 3 for calling a global function with example usage: test_error_on_different_shape(metric_class) without return types