code: def lowess(x, y, f=2.0 / 3.0, iterations=1):
      """lowess(x, y, f=2./3., iter=3) -> yest
      Lowess smoother: Robust locally weighted regression.
      The lowess function fits a nonparametric regression curve to a scatterplot.
      The arrays x and y contain an equal number of elements; each pair
      (x[i], y[i]) defines a data point in the scatterplot. The function returns
      the estimated (smooth) values of y.
      The smoothing span is given by f. A larger value for f will result in a
      smoother curve. The number of robustifying iterations is given by iter. The
      function will run faster with a smaller number of iterations.
      """
      n = len(x)
      r = int(ceil(f * n))
      h = np.clip(
          [np.sort(np.abs(x - x[i]))[r] for i in range(n)], 1e-8, np.inf
      )
      w = np.clip(np.abs((x[:, None] - x[None, :]) / h), 0.0, 1.0)
      w = (1 - w**3) ** 3
      yest = np.zeros(n)
      delta = np.ones(n)
      for _ in range(iterations):
          for i in range(n):
              weights = delta * w[:, i]
              b = np.array(
                  [np.sum(weights * y), np.sum(weights * y * x)]
              )
              A = np.array(
                  [
                      [np.sum(weights), np.sum(weights * x)],
                      [np.sum(weights * x), np.sum(weights * x * x)],
                  ]
              )
              # I think it is safe to assume this.
              # pylint: disable=unexpected-keyword-arg
              try:
                  beta = linalg.solve(
                      A, b, assume_a="pos", check_finite=False
                  )
              except np.linalg.LinAlgError:
                  beta = [0, 0]
              yest[i] = beta[0] + beta[1] * x[i]
  
          residuals = y - yest
          s = np.median(np.abs(residuals))
          delta = np.clip(residuals / (6.0 * s), -1, 1)
          delta = (1 - delta**2) ** 2
  
      return yest
  
imports: from math import ceil
  import warnings
  import numpy
  from scipy import linalg
label_desc: Use image node_id 1 for calling a global function with example usage: lowess(x, y, f, iterations) and returns: yest