code: def xors_constraint(v=1):
      
      assert v in [0,1], "v must be 0 or 1 instead of %s" % v.__repr__()
      model, x, y, z = _init()
      r = True
      model.addConsXor([x,y,z], r)
      model.addCons(x==v)
      _optimize("Standard XOR (as boolean)", model)
docs: XOR (r as boolean) standard constraint