code: def test_clone_idempotent():
      model = (
          preprocessing.StandardScaler()
          | linear_model.LogisticRegression(
              optimizer=optim.Adam(), l2=0.1
          )
      )
  
      trace = []
      for x, y in datasets.Phishing():
          trace.append(model.predict_proba_one(x))
          model.learn_one(x, y)
  
      clone = model.clone()
      for i, (x, y) in enumerate(datasets.Phishing()):
          assert clone.predict_proba_one(x) == trace[i]
          clone.learn_one(x, y)
  
file_path: river/river/base/test_base.py
imports: from __future__ import annotations
  from river import compose, datasets, linear_model, optim, preprocessing, stats, time_series
label_desc: Use image node_id 4 for calling a global function with example usage: test_clone_idempotent() without return types