code: def test_wrong_input_shapes():
      m = MedianRelativeAbsoluteError()
  
      with pytest.raises(
          ValueError, match=r"Predictions should be of shape"
      ):
          m.update((torch.rand(4, 1, 2), torch.rand(4, 1)))
  
      with pytest.raises(
          ValueError, match=r"Targets should be of shape"
      ):
          m.update((torch.rand(4, 1), torch.rand(4, 1, 2)))
  
      with pytest.raises(
          ValueError, match=r"Predictions should be of shape"
      ):
          m.update((torch.rand(4, 1, 2), torch.rand(4)))
  
      with pytest.raises(
          ValueError, match=r"Targets should be of shape"
      ):
          m.update((torch.rand(4), torch.rand(4, 1, 2)))
  
imports: import os
  import numpy
  import pytest
  import torch
  import ignite.distributed
  from ignite.contrib.metrics.regression import MedianRelativeAbsoluteError
  from ignite.engine import Engine
  from ignite.exceptions import NotComputableError
label_desc: Use image node_id 2 for calling a global function with example usage: test_wrong_input_shapes() without return types