def METHOD_NAME(
    k: pn.randprocs.covfuncs.CovarianceFunction, shape: ShapeType
):
    """Test whether passing an input with the wrong input shape raises an error."""
    if k.input_ndim > 0:
        input_shape = shape + tuple(dim + 1 for dim in k.input_shape)
        # `CovarianceFunction.linop`
        with pytest.raises(ValueError):
            k.linop(np.zeros(input_shape))
        with pytest.raises(ValueError):
            k.linop(np.ones(input_shape), np.zeros(shape + k.input_shape))
        with pytest.raises(ValueError):
            k.linop(np.ones(shape + k.input_shape), np.zeros(input_shape))
        # `CovarianceFunction.matrix`
        with pytest.raises(ValueError):
            k.matrix(np.zeros(input_shape))
        with pytest.raises(ValueError):
            k.matrix(np.ones(input_shape), np.zeros(shape + k.input_shape))
        with pytest.raises(ValueError):
            k.matrix(np.ones(shape + k.input_shape), np.zeros(input_shape))