def METHOD_NAME(stat, sub_a_expected, sub_b_expected, get_dataframe):
    """
    Test that we get expected return values for the various statistics
    """
    sub_a_id, sub_b_id = "j6QYNbMJgAwlVORP", "NG1km5NzBg5JD8nj"
    rl = daily_location("2016-01-01", spatial_unit=make_spatial_unit("lon-lat"))
    df = get_dataframe(
        DistanceSeries(
            subscriber_locations=SubscriberLocations(
                "2016-01-01",
                "2016-01-07",
                spatial_unit=make_spatial_unit("lon-lat"),
            ),
            reference_location=rl,
            statistic=stat,
        )
    )
    df = (
        df.assign(datetime=pd.to_datetime(df.datetime))
        .set_index(["subscriber", "datetime"])
        .sort_index()
    )
    sub = df.loc[sub_a_id]
    assert df.loc[sub_a_id].loc["2016-01-01"].value == pytest.approx(sub_a_expected)
    assert df.loc[(sub_b_id, datetime(2016, 1, 6))].value == pytest.approx(
        sub_b_expected
    )