def METHOD_NAME(self, input_param, input_shape, expected_shape):
    dsdepth = input_param.get("dsdepth", 1)
    net = SegResNetDS(**input_param).to(device)
    net.train()
    result = net(torch.randn(input_shape).to(device))
    if dsdepth > 1:
        assert isinstance(result, list)
        self.assertEqual(dsdepth, len(result))
        for i in range(dsdepth):
            self.assertEqual(
                result[i].shape,
                expected_shape[:2] + tuple(e // (2**i) for e in expected_shape[2:]),
                msg=str(input_param),
            )
    else:
        assert isinstance(result, torch.Tensor)
        self.assertEqual(result.shape, expected_shape, msg=str(input_param))
    net.eval()
    result = net(torch.randn(input_shape).to(device))
    assert isinstance(result, torch.Tensor)
    self.assertEqual(result.shape, expected_shape, msg=str(input_param))