A Primal-Dual Algorithm for Hybrid Federated Learning