They searched the library’s catalog for words like “gay” and “transgender” to ban books.