&write_expire and &expire_Func

I’m very new to Bro as this is one of my first scripts. Can anyone explain to me how the &write_expire and &expire_func work on a table? I would like to change a value in a table when an event occurs and pass the table into a function.

Thanks!