code: def test_reduction_for_dim_none(reduction):
      """Test that warnings are raised when then reduction parameter is combined with no dim provided arg."""
      match = f"The `reduction={reduction}` will not have any effect when `dim` is None."
      with pytest.warns(UserWarning, match=match):
          PeakSignalNoiseRatio(reduction=reduction, dim=None)
  
      with pytest.warns(UserWarning, match=match):
          peak_signal_noise_ratio(
              _inputs[0].preds,
              _inputs[0].target,
              reduction=reduction,
              dim=None,
          )
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from skimage.metrics import peak_signal_noise_ratio
  from torchmetrics.functional import peak_signal_noise_ratio
  from torchmetrics.image import PeakSignalNoiseRatio
  from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_2_1
  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_reduction_for_dim_none(reduction) without return types