def _get_permissions(self) -> Iterable[Union[BasePermission, AsyncBasePermission]]:
        """
        Instantiates and returns the list of permissions that this view requires.
        """
        assert self.context

        for permission_class in self.context.permission_classes:
            permission_instance: Union[BasePermission, AsyncBasePermission] = (
                permission_class  # type: ignore[assignment]
            )
            if isinstance(permission_class, type) and issubclass(
                permission_class, BasePermission
            ):
                permission_instance = permission_class.resolve()

            yield permission_instance

        Instantiates and returns the list of permissions that this view requires.
        
ninja_extra/controllers/base.py