Does it make sense to also add a type for these parameters here (float, etc.)?

Also applies for variables in this function. Everything in there is still pure Python...