code: def filter(self, table, users, filter_string):
          
          q = filter_string.lower()
          return [user for user in users
                  if (q in user.name.lower() or
                      q in (getattr(user, 'email', None) or '').lower())]
docs: Naive case-insensitive search.