function vs piece of work

function

noun
  • What something does or is used for. 

  • The physiological activity of an organ or body part. 

  • A routine that receives zero or more arguments and may return a result. 

  • The role of a social practice in the continued existence of the group. 

  • An official or social occasion. 

  • A party. 

  • The characteristic behavior of a chemical compound. 

  • A relation in which each element of the domain is associated with exactly one element of the codomain. 

  • A professional or official position. 

  • A relation where one thing is dependent on another for its existence, value, or significance. 

  • Something which is dependent on or stems from another thing; a result or concomitant. 

verb
  • To have a function. 

  • To carry out a function; to be in action. 

piece of work

noun
  • A product or manufactured article, especially an item of art or craft. 

  • A person who has a strong and unusual personality, especially one with seriously unpleasant character flaws (e.g. a nasty piece of work). (This sense came about due to Hamlet’s soliloquy (see sense 1 above)). 

How often have the words function and piece of work occurred in a corpus of books? (source: Google Ngram Viewer )