def render(args):
    """
    Helper that paginates and filters data when requested
    through the REST Api

    :param args:
    :return:
    """
    query = database.session_query(User)

    filt = args.pop("filter")

    if filt:
        terms = filt.split(";")
        query = database.filter(query, User, terms)

    return database.sort_and_page(query, User, args)

    Helper that paginates and filters data when requested
    through the REST Api

    :param args:
    :return:
    
lemur/users/service.py