The following is adapted from code written by Dr. Rahul Rajkumar while assisting me in some computations for a paper. The code itself proved useful for computations, and I figured it would be useful to share! If you have any issues with it, please feel free to contact me!