Answer :
If the italicized words are professing themselves to be wise, then this is a participial phrase.
It describes what the pronoun they is doing.
It describes what the pronoun they is doing.