code: def test_procedure_form():
      dt = 1.0
      std_z = 10.1
  
      x = np.array([[0.0], [0.0]])
      F = np.array([[1.0, dt], [0.0, 1.0]])
      H = np.array([[1.0, 0.0]])
      P = np.eye(2)
      R = np.eye(1) * std_z**2
      Q = Q_discrete_white_noise(2, dt, 5.1)
  
      kf = KalmanFilter(2, 1)
      kf.x = x.copy()
      kf.F = F.copy()
      kf.H = H.copy()
      kf.P = P.copy()
      kf.R = R.copy()
      kf.Q = Q.copy()
  
      measurements = []
      xest = []
      pos = 0.0
      for t in range(2000):
          z = pos + random.randn() * std_z
          pos += 100
  
          # perform kalman filtering
          x, P = predict(x, P, F, Q)
          kf.predict()
          assert norm(x - kf.x) < 1.0e-12
          x, P, _, _, _, _ = update(x, P, z, R, H, True)
          kf.update(z)
          assert norm(x - kf.x) < 1.0e-12
  
          # save data
          xest.append(x.copy())
          measurements.append(z)
  
      xest = np.asarray(xest)
      measurements = np.asarray(measurements)
      # plot data
      if DO_PLOT:
          plt.plot(xest[:, 0])
          plt.plot(xest[:, 1])
          plt.plot(measurements)
  
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 9 for calling a global function with example usage: test_procedure_form() without return types