def iuo(z1,z2):
    """
        intersection over union 
        :param z1: polygon
        :param z2: polygon
        returns z1.intersection(z2) / z1.union(z2)
        
    """
    assert z1.isvalid
    assert z2.isvalid
    return z1.intersection(z2) / z1.union(z2)