act as a substitute for vs fulfill the function of

act as a substitute for

fulfill the function of

How often have the words act as a substitute for and fulfill the function of occurred in a corpus of books? (source: Google Ngram Viewer )