def METHOD_NAME(name=None, session=None):
    logger.debug('retrieving regexp lists')
    query = session.query(RegexpListList)
    if name:
        logger.debug('filtering by name {}', name)
        query = query.filter(RegexpListList.name.contains(name))
    return query.all()