A multilevel proximal gradient algorithm for a class ofcomposite optimization problems