(1) "Opinions vary about the benefits of EU membership".
(2) "Ed varied his diet to make it more interesting".
(3) "Our attempts resulted in varying degrees of success".
In (1) the noun "opinions" is the subject, and the function of the verb "vary" is "predicator". In (2) the subject is the noun "Ed" and the function of the verb "varied" is predicator. In (3) "varying" is a verb and its function is modifier of "degrees" in the noun phrase "varying degrees of success".