FLEX: FLEXible Federated Learning Framework