Code sample for StackOverflow answer.