code: def check_seeding_is_idempotent(model, dataset):
      from river import utils
  
      params = model._get_params()
      seeded_params = seed_params(params, seed=42)
  
      A = model.clone(seeded_params)
      B = model.clone(seeded_params)
  
      for x, y in dataset:
          if utils.inspect.isanomalydetector(model):
              assert A.score_one(x) == B.score_one(x)
          else:
              assert A.predict_one(x) == B.predict_one(x)
          if model._supervised:
              A.learn_one(x, y)
              B.learn_one(x, y)
          else:
              A.learn_one(x)
              B.learn_one(x)
  
imports: from __future__ import annotations
  import copy
  import inspect
  import pickle
  import random
  from .utils import assert_predictions_are_close, seed_params
label_desc: Use image node_id 18 for calling a global function with example usage: check_seeding_is_idempotent(model, dataset) without return types