code: def iter_perturbations(keys, n=10):
      """Enumerate perturbations that will be applied to the weights."""
  
      # Enumerate unit vectors
      for i in keys:
          yield {j: int(i == j) for j in keys}
  
      # Enumerate samples from a spherical Gaussian
      for _ in range(n):
          p = {j: random.gauss(0, 1) for j in keys}
          norm = utils.math.norm(p, order=2)
          for j in p:
              p[j] /= norm
          yield p
  
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 1 for calling a global function with example usage: iter_perturbations(keys, n) without return types