code: def check_shuffle_features_no_impact(model, dataset):
      """Changing the order of the features between calls should have no effect on a model."""
  
      from river import utils
  
      params = seed_params(model._get_params(), seed=42)
      model = model.clone(params)
      shuffled = copy.deepcopy(model)
  
      for x, y in dataset:
          # Shuffle the features
          features = list(x.keys())
          random.shuffle(features)
          x_shuffled = {i: x[i] for i in features}
  
          assert x == x_shuffled  # order doesn't matter for dicts
  
          if utils.inspect.isclassifier(model):
              try:
                  y_pred = model.predict_proba_one(x)
                  y_pred_shuffled = shuffled.predict_proba_one(
                      x_shuffled
                  )
              except NotImplementedError:
                  y_pred = model.predict_one(x)
                  y_pred_shuffled = shuffled.predict_one(x_shuffled)
          elif utils.inspect.isanomalydetector(model):
              y_pred = model.score_one(x)
              y_pred_shuffled = shuffled.score_one(x_shuffled)
          else:
              y_pred = model.predict_one(x)
              y_pred_shuffled = shuffled.predict_one(x_shuffled)
  
          if utils.inspect.isactivelearner(model):
              y_pred, _ = y_pred
              y_pred_shuffled, _ = y_pred_shuffled
  
          assert_predictions_are_close(y_pred, y_pred_shuffled)
  
          if utils.inspect.isanomalydetector(model):
              model.learn_one(x)
              shuffled.learn_one(x_shuffled)
          else:
              model.learn_one(x, y)
              shuffled.learn_one(x_shuffled, y)
  
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 2 for calling a global function with example usage: check_shuffle_features_no_impact(model, dataset) without return types