Building a Tree-Structured Parzen Estimator from Scratch (Kind Of)