code: def plot_grid_weights(sigmas, spans):
      n, m = len(sigmas), len(spans)
      _, axes = plt.subplots(
          n, m, figsize=(10, 7), sharex=True, sharey=True
      )
      for i, ax in enumerate(axes.flat):
          span = spans[i % m]
          sigma = sigmas[int(i / n) % m]
          mod = LowessRegression(sigma=sigma, span=span).fit(
              xs.reshape(-1, 1), ys
          )
          wts = mod._calc_wts([1.5])
          ax.plot(xs, wts, color="steelblue")
          ax.set_title(f"$\sigma$={sigma}, span={span}")
      return axes
  
imports: from pathlib import Path
  import gif
  import matplotlib.pylab
  import seaborn
  import numpy
  from sklego.linear_model import LowessRegression
  from sklearn.datasets import make_regression
  import pandas
  from sklearn.pipeline import Pipeline, FeatureUnion
  from sklearn.linear_model import LinearRegression
  from sklearn.decomposition import PCA
  from sklearn.model_selection import GridSearchCV
  from sklego.meta import EstimatorTransformer
  from sklego.linear_model import ProbWeightRegression
  from sklego.preprocessing import ColumnSelector
  from sklearn import set_config
  from sklearn.utils import estimator_html_repr
  import numpy
  import numpy
  from sklearn.linear_model import LinearRegression
  import numpy
  from sklearn.linear_model import LinearRegression
  from sklego.linear_model import LADRegression
  import numpy
  from sklego.linear_model import QuantileRegression
label_desc: Use image node_id 1 for calling a global function with example usage: plot_grid_weights(sigmas, spans) and returns: axes