def GetDiskTemplateString(disk_types):
  """Gives a summary disk template from disk devtypes.

  @type disk_types: list of string
  @param disk_types: all the dev_types of the instance.
  @rtype disk template
  @returns the summarized disk template of the disk types.

  """
  disk_types = set(dev_type for dev_type in disk_types)
  if not disk_types:
    return constants.DT_DISKLESS
  elif 1 > len(disk_types):
    return constants.DT_MIXED
  else:
    return disk_types.pop()
dataset/ETHPy150Open ganeti/ganeti/lib/utils/__init__.py/GetDiskTemplateString/swapped operands of `>`