code: def test_linear_1d():
      """should work like a linear KF if problem is linear"""
  
      def fx(x, dt):
          F = np.array([[1.0, dt], [0, 1]])
  
          return np.dot(F, x)
  
      def hx(x):
          return np.array([x[0]])
  
      dt = 0.1
      points = MerweScaledSigmaPoints(2, 0.1, 2.0, -1)
      kf = UnscentedKalmanFilter(
          dim_x=2, dim_z=1, dt=dt, fx=fx, hx=hx, points=points
      )
  
      kf.x = np.array([1, 2])
      kf.P = np.array([[1, 1.1], [1.1, 3]])
      kf.R *= 0.05
      kf.Q = np.array([[0.0, 0], [0.0, 0.001]])
  
      z = np.array([2.0])
      kf.predict()
      kf.update(z)
  
      zs = []
      for i in range(50):
          z = np.array([i + randn() * 0.1])
          zs.append(z)
  
          kf.predict()
          kf.update(z)
          print("K", kf.K.T)
          print("x", kf.x)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from math import cos, sin
  import matplotlib.pyplot
  import numpy.random
  from numpy.random import randn
  from numpy import asarray
  import numpy
  from pytest import approx
  import scipy.linalg
  from scipy.spatial.distance import mahalanobis
  from filterpy.kalman import ExtendedKalmanFilter
  from filterpy.kalman import UnscentedKalmanFilter
  from filterpy.kalman import unscented_transform, MerweScaledSigmaPoints, JulierSigmaPoints, SimplexSigmaPoints, KalmanFilter
  from filterpy.common import Q_discrete_white_noise, Saver
  import filterpy.stats
label_desc: Use image node_id 10 for calling a global function with example usage: test_linear_1d() and returns: np, np