python code for generating coherence constraints for lower previsions