code: def test_second_order():
      """data and example from Zarchan, page 114"""
  
      lsf = LeastSquaresFilter(1, order=2)
      lsf0 = LeastSquaresFilterOriginal(1, order=2)
  
      xs = [1.2, 0.2, 2.9, 2.1]
      ys = []
      for x in xs:
          y = lsf.update(x)[0]
          y0 = lsf0(x)
          assert near_equal(y, y0)
          ys.append(y)
  
      plt.scatter(range(len(xs)), xs, c="r", marker="+")
      plt.plot(ys, c="g")
      plt.plot([0, len(xs) - 1], [ys[0], ys[-1]], c="b")
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from math import sqrt
  import matplotlib.pyplot
  import numpy
  from numpy import dot
  import numpy.random
  from scipy.linalg import inv
  from filterpy.gh import GHFilter
  from filterpy.leastsq import LeastSquaresFilter
label_desc: Use image node_id 4 for calling a global function with example usage: test_second_order() without return types