def RequiredNodes(self):
    """Calculates the required nodes based on the disk_template.

    """
    if constants.DTS_INT_MIRROR in self.disk_template:
      return 2
    else:
      return 1
dataset/ETHPy150Open ganeti/ganeti/lib/masterd/iallocator.py/IAReqInstanceAlloc.RequiredNodes/swapped operands of `in`