How to Override py method in erpnext v9

A search turns up this How to override method in frappe?