code: def entry_for_view(self, view, perm_name):
          
          view_name = self._get_view_name(view)
          entry = self._get_entry(perm_name)
          if view_name in entry.views:
              return entry
          return None
docs: Get registry entry for permission if ``view`` requires it.
  
          In other words, if ``view`` requires the permission specified by
          ``perm_name``, return the :class:`Entry` associated with the
          permission. If ``view`` doesn't require the permission, return
          ``None`` instead.