How To Define The Derivative Function In Python