code: def search(cls, query, q):
          
          query = query.join(User).filter(
                  User.email.like('%{0}%'.format(q)),
          )
          return query
docs: Modify query as so include only specific members.
  
          :param query: Query object.
          :param str q: Search string.
          :returs: Query object.