The Primal-Dual method for Learning Augmented Algorithms