ally (oneself) with vs take the part of

ally (oneself) with

take the part of

How often have the words ally (oneself) with and take the part of occurred in a corpus of books? (source: Google Ngram Viewer )