Python-translated version of takespec from Baylee