def METHOD_NAME():
    with pytest.raises(ValueError, match="'invalid' is not a valid Statistic"):
        """
        Test that SubscriberStayLengths raises an error if the specified statistic
        is not one of valid_stats
        """
        ssl = SubscriberStayLengths(
            locations=[
                daily_location(
                    "2016-01-01", spatial_unit=make_spatial_unit("admin", level=3)
                ),
                daily_location(
                    "2016-01-02", spatial_unit=make_spatial_unit("admin", level=3)
                ),
            ],
            statistic="invalid",
        )