Python Same Method Differentiation Rules Derivatives