class ServerDataSource implements FederatedNetworkDataSource {

    @Override
    public Observable<Boolean> sendGradient(byte[] gradient) {
        NetworkModel networkModel = mapper.toNetworkModel(gradient);
        RequestBody requestBody = RequestBody
                .create(MediaType.parse("application/octet-stream"), networkModel.getGradient());
        return networkService.uploadGradient(requestBody);
    }

    public  ServerDataSource(ServerService networkService, NetworkMapper mapper);

}