A federal judge has ordered that books on gender and race be returned to the shelves of school libraries on…