im_ismonotonic() becomes a class