There's an algo behind "highlights" ... I don't think that part was open sourced but I haven't looked at the code closely.