Can you write a docstring describing what the purpose of this function is, which `recipe` values are implemented and ideally a description or reference so that people can figure out what it does without studying the code?