def METHOD_NAME(names, session=None):
    if session is None:
        session = get_default_session()
    query = session.query(Simulation)
    clause = None
    if names is not None:
        for rxi in names:
            if clause is None:
                clause = (Simulation.basename == rxi)
            else:
                clause |= (Simulation.basename == rxi)
        query = query.filter(clause)
    return query