Is there a function that takes in a polynomial and returns its degree? For example: suppose we have the ring R = PolynomialRing(ZZ, 'x'), and the polynomial p = (x-1)*(x-2). The degree function I'm looking for should return 2 when applied to p. Does such a function exist??