def METHOD_NAME(
    distr: PiecewiseLinear,
    target: List[float],
    expected_target_cdf: List[float],
    expected_target_crps: List[float],
):
    target = torch.Tensor(target).reshape(shape=(len(target),))
    expected_target_cdf = np.array(expected_target_cdf).reshape(
        (len(expected_target_cdf),)
    )
    expected_target_crps = np.array(expected_target_crps).reshape(
        (len(expected_target_crps),)
    )
    assert all(np.isclose(distr.cdf(target).numpy(), expected_target_cdf))
    assert all(np.isclose(distr.crps(target).numpy(), expected_target_crps))
    # compare with empirical cdf from samples
    num_samples = 100_000
    samples = distr.sample((num_samples,)).numpy()
    assert np.isfinite(samples).all()
    emp_cdf, edges = empirical_cdf(samples)
    calc_cdf = distr.cdf(torch.Tensor(edges)).numpy()
    assert np.allclose(calc_cdf[1:, :], emp_cdf, atol=1e-2)