The code for this is pretty tightly coupled to the Quizlet codebase right now unfortunately, but I'll work on extracting some sample code soon if there's time.
Isn't tight coupling one of the code smells?
Well, writing code that's too generic or overly abstracted is also a premature optimization...