take one's medicine vs take the rap

take one's medicine

verb
  • To endure an unpleasant obligation, especially a punishment. 

  • Used other than figuratively or idiomatically: see take, medicine. 

take the rap

verb
  • To be blamed or punished for something, especially for the wrongful actions of another; to willingly allow oneself to be so blamed or punished. 

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