def METHOD_NAME(_context, request):
    q_param = request.params.get("q")
    filter_terms = []
    if q_param:
        filter_terms.append(func.lower(Organization.name).like(f"%{q_param.lower()}%"))
    return (
        request.db.query(Organization)
        .filter(*filter_terms)
        .order_by(Organization.created.desc())
    )