Code for rename function

Where does the code for the rename function live.
https://erpnext.org/docs/user/manual/en/using-erpnext/articles/renaming-documents

Just a guess possibly here frappe/rename_doc.py at develop · frappe/frappe · GitHub

You could trace and sift through the code too of course
(env) frappe@ubuntu:~/frappe-bench$ find . -name ‘*.py’ | xargs grep rename

Exactly what i was looking for. Thanks.