Federated Optimization in Heterogeneous Networks