code: def test_univariate():
      f = KalmanFilter(dim_x=1, dim_z=1, dim_u=1)
      f.x = np.array([[0]])
      f.P *= 50
      f.H = np.array([[1.0]])
      f.F = np.array([[1.0]])
      f.B = np.array([[1.0]])
      f.Q = 0.02
      f.R *= 0.1
  
      for i in range(50):
          f.predict()
          f.update(i)
  
imports: from __future__ import absolute_import, division, print_function
  import numpy.random
  from numpy.random import randn
  import numpy
  import matplotlib.pyplot
  from pytest import approx
  from filterpy.kalman import KalmanFilter, update, predict, batch_filter
  from filterpy.common import Q_discrete_white_noise, kinematic_kf, Saver
  from filterpy.stats import mahalanobis
  from scipy.linalg import block_diag, norm
label_desc: Use image node_id 8 for calling a global function with example usage: test_univariate() without return types