hi! Could you please explain to me how you managed to write a function that checks if the function is concave or convex?