Wanted to be able to do something like if `PyObject_RichCompareBool(val, ..., cmp_method): ...` to simplify the conditional logic, but couldn't find a way to do something like this in Cython without the GIL.