pay one’s dues vs take one’s medicine

pay one’s dues

take one’s medicine

How often have the words pay one’s dues and take one’s medicine occurred in a corpus of books? (source: Google Ngram Viewer )