code: def test_perceptron_sklearn_coherence(river_params, sklearn_params):
      """Checks that the sklearn and river implementations produce the same results."""
  
      ss = preprocessing.StandardScaler()
      rv = lm.Perceptron(**river_params)
      sk = sklm.Perceptron(**sklearn_params)
  
      for x, y in datasets.Bananas().take(100):
          ss.learn_one(x)
          x = ss.transform_one(x)
          rv.learn_one(x, y)
          sk.partial_fit([list(x.values())], [y], classes=[False, True])
  
      for i, w in enumerate(rv.weights.values()):
          assert math.isclose(w, sk.coef_[0][i])
  
      assert math.isclose(rv.intercept, sk.intercept_[0])
  
imports: from __future__ import annotations
  import copy
  import itertools
  import math
  import random
  import numpy
  import pandas
  import pytest
  from sklearn import linear_model
  from sklearn.datasets import make_classification, make_regression
  from sklearn.metrics import log_loss
  from river import datasets, optim, preprocessing, stream, utils
  from river import linear_model
label_desc: Use image node_id 9 for calling a global function with example usage: test_perceptron_sklearn_coherence(river_params, sklearn_params) without return types