To complete the thread, here is the solution that I ultimately wrote:
Thanks to all who helped! Hopefully all the functions are this easy to find…