code: def test_fig_3_8():
      """figure 3.8 in Zarchan, p. 108"""
      lsf = LeastSquaresFilter(0.1, order=1)
      lsf0 = LeastSquaresFilterOriginal(0.1, order=1)
  
      xs = [x + 3 + random.randn() for x in np.arange(0, 10, 0.1)]
      ys = []
      for x in xs:
          y0 = lsf0(x)
          y = lsf.update(x)[0]
          assert near_equal(y, y0)
          ys.append(y)
  
      plt.plot(xs)
      plt.plot(ys)
  
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 5 for calling a global function with example usage: test_fig_3_8() without return types