code: def visible_to_user(self, user):
          
  
          return Host.objects.filter(Q(groups_visible__in=user.groups.all()) | Q(groups_visible__isnull=True)).distinct()
docs: Get a list of hosts available to a given user.
  
          Same logic as Announcements and Events.