https://towardsdatascience.com/introduction-to-trend-filtering-with-applications-in-python-d69a58d23b2