Could you actually add this as a ```helper``` instead of a ```filter```?

Just move this function to the ```helpers``` object below, and call it as a function instead of a filter in the template (```get_featured(apps)```)