Before we land #363 on master we should temporarily move handlers/llm/sampling.py out of the library code and inline it into a relevant example's code (e.g. the original source #404). While at a high level we will certainly want machinery like this in the library, the design and implementation are likely to change significantly in the near term (cf #415 #417 #407 etc) so we probably don't want to commit to maintaining it in its current form.