I have no template, but this video by Connor is beneficial. VEXCode PID Tutorial
It is in C++ but if you understand Python, it should be able to help your understanding of how to set up a PID. All code is the same in its base function, so you could potentially write a pseudo code from this video, and then translate your pseudo code into Python afterwords.