  We set up a general context in which one can prove Sauer-Shelah type lemmas.
We apply our general results to answer a question of Bhaskar and give a slight
improvement to a result of Malliaris and Terry. We also prove a new
Sauer-Shelah type lemma in the context of op-rank, a notion of Guingona and
Hill.
