Conditional join implemented in python with C bindings.