Dolby interview question

Using Python to implement llm sampling algorithm, like top-K and top-P sampling; stress test during the middle