code: def make_cv_filter(dt, noise_factor):
      cvfilter = KalmanFilter(dim_x=2, dim_z=1)
      cvfilter.x = array([0.0, 0.0])
      cvfilter.P *= 3
      cvfilter.R *= noise_factor**2
      cvfilter.F = array([[1, dt], [0, 1]], dtype=float)
      cvfilter.H = array([[1, 0]], dtype=float)
      cvfilter.Q = Q_discrete_white_noise(dim=2, dt=dt, var=0.02)
      return cvfilter
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from math import sin, cos, radians
  import numpy.random
  import numpy
  from numpy import array
  from numpy.random import randn
  import matplotlib.pyplot
  from filterpy.kalman import IMMEstimator, KalmanFilter
  from filterpy.common import Q_discrete_white_noise, Saver
label_desc: Use image node_id 2 for calling a global function with example usage: make_cv_filter(dt, noise_factor) and returns: cvfilter