How to change role in user.py

Hello , I’m a newbie developer , I have one mistake about role permission .
I want to change role from ‘student’ to ‘occupant’ (when click save button on document)
How code or syntax in python or javascript ?

Location to change code (frappe/frappe/core/doctype/user/user.py) It is correct or wrong ?
Thank You.

Have you looked at Role List , Role Permission Manager?

There is no need to change code, you can select “Duplicate” when you are in the 'Form" view of the Student role, and then rename it to Occupant.