a little weird that ret should be a event but initialize as a boolean  how about this while true ret self  event stream map plugin stream  next if ret is none return none if self  policy matchevent ret return ret