<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def inject_context(self):
 """Return a dict used for a template context."""

        navbar = filter(lambda entry: entry.visible, self.navbar_entries)
        return {'navbar': navbar}