def UpgradeIPolicy(self, ipolicy, default_ipolicy, isgroup):
    minmax_keys = ["min", "max"]
    if any((ipolicy in k) for k in minmax_keys):
      minmax = {}
      for key in minmax_keys:
        if key in ipolicy:
          if ipolicy[key]:
            minmax[key] = ipolicy[key]
          del ipolicy[key]
      if minmax:
        ipolicy["minmax"] = [minmax]
    if isgroup and "std" in ipolicy:
      del ipolicy["std"]
    self._FillIPolicySpecs(default_ipolicy, ipolicy)
dataset/ETHPy150Open ganeti/ganeti/lib/tools/cfgupgrade.py/CfgUpgrade.UpgradeIPolicy/swapped operands of `in`