Add yields decorator for generator functions.