code: def test_error_on_wrong_p_arg():
      """Test that error is raised if wrongly p argument is provided."""
      with pytest.raises(
          TorchMetricsUserError,
          match="Argument ``p`` must be a float.*",
      ):
          MinkowskiDistance(p=-10)
  
file_path: torchmetrics/tests/unittests/regression/test_minkowski_distance.py
imports: from functools import partial
  import pytest
  import torch
  from scipy.spatial.distance import minkowski
  from torchmetrics.functional import minkowski_distance
  from torchmetrics.regression import MinkowskiDistance
  from torchmetrics.utilities.exceptions import TorchMetricsUserError
  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_p_arg() without return types