code: def prime_menu_items(self, menu_items):
          
          for item in menu_items:
              item = self._prime_menu_item(item)
              if item is not None:
                  yield item
docs: A generator method that takes a list of ``MenuItem`` or ``Page``
          objects and sets a number of additional attributes on each item that
          are useful in menu templates.