code: def test_error_on_wrong_eval_func() -> None:
      """Test that error is raised on wrong `eval_func` argument."""
      metric = PermutationInvariantTraining(
          signal_noise_ratio, eval_func="xxx"
      )
      with pytest.raises(
          ValueError, match='eval_func can only be "max" or "min"'
      ):
          metric(torch.randn(3, 3, 10), torch.randn(3, 3, 10))
  
imports: from functools import partial
  from typing import Callable, Tuple
  import numpy
  import pytest
  import torch
  from scipy.optimize import linear_sum_assignment
  from torch import Tensor
  from torchmetrics.audio import PermutationInvariantTraining
  from torchmetrics.functional.audio import permutation_invariant_training, scale_invariant_signal_distortion_ratio, signal_noise_ratio
  from torchmetrics.functional.audio.pit import _find_best_perm_by_exhaustive_method, _find_best_perm_by_linear_sum_assignment
  from unittests import BATCH_SIZE, NUM_BATCHES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 4 for calling a global function with example usage: test_error_on_wrong_eval_func() without return types