code: def visible_to_user(self, user):
          
  
          return Poll.objects.filter(Q(groups__in=user.groups.all()) | Q(groups__isnull=True))
docs: Get a list of visible polls for a given user (usually request.user).
  
          These visible polls will be those that either have no groups
          assigned to them (and are therefore public) or those in which
          the user is a member.