I am using this code that I found here for logistic regression for binary classification with 2 classes.
https://github.com/datafleets/horizontal-federated-learning-blog/