Thread:Project:Support desk/How to check from a template if a page is in a given category?

Hi, I'd like to write a template for Wikisource with a code that would check if a book (page "Index:Book") is in the "Category:Finished" (fictional category name), and then change an icon accordingly. Is there a magic word for that? Or any other way to do it?