Could anyone give me ‍the function 'kf'

Dear all,
I am trying to run the codes of the paper " The effects of monetary policy news and surprises " by Milani and Treadwell (2012), but got the following error:

Undefined function ‘kf’ for input arguments of type ‘double’.

Error in likelihood_RE_ALL (line 887)

Error in MH_RE_ALL (line 78)

Could anyone give me ‍the function ‘kf’ and some guidance?
Thank you very much!

That seems to be a Kalman Filter function. Hard to tell what the original function was. The closest to this seems to be the one in the replication file of Justiniano/Primiceri/Tambalotti (2013) in the AEJ Macro. It is attached.
kf.m (1.39 KB)

Dear Pfeifer,

Thank you for the reply. The function ‘kf’ you gave me can work very well.

Once again, thank you very much for your help.