code: def filter_data(d, x, model="lms", **kwargs):
      
      # overwrite n with correct size
      kwargs["n"] = x.shape[1]
      # create filter according model
      if model in ["LMS", "lms"]:
          f = FilterLMS(**kwargs)
      elif model in ["NLMS", "nlms"]:
          f = FilterNLMS(**kwargs)
      elif model in ["RLS", "rls"]:
          f = FilterRLS(**kwargs)
      elif model in ["GNGD", "gngd"]:
          f = FilterGNGD(**kwargs)
      elif model in ["AP", "ap"]:
          f = FilterAP(**kwargs)
      elif model in ["LMF", "lmf"]:
          f = FilterLMF(**kwargs)
      elif model in ["NLMF", "nlmf"]:
          f = FilterNLMF(**kwargs)
      else:
          raise ValueError('Unknown model of filter {}'.format(model))
      # calculate and return the values
      y, e, w = f.run(d, x)
      return y, e, w
docs: Function that filter data with selected adaptive filter.
      
      **Args:**
  
      * `d` : desired value (1 dimensional array)
  
      * `x` : input matrix (2-dimensional array). Rows are samples, columns are
        input arrays.
          
      **Kwargs:**
      
      * Any key argument that can be accepted with selected filter model. 
        For more information see documentation of desired adaptive filter.
  
      **Returns:**
  
      * `y` : output value (1 dimensional array).
        The size corresponds with the desired value.
  
      * `e` : filter error for every sample (1 dimensional array). 
        The size corresponds with the desired value.
  
      * `w` : history of all weights (2 dimensional array).
        Every row is set of the weights for given sample.