def validate_labels(labels):
    """ensure that labels are well formed.
  Args:
    labels (list): a list of integers on the range [0,1]
  """
    if (labels == 0).sum() == 0:
        raise Exception('All rank_set were corrupt')
    if (labels == 1).sum() == 0:
        raise Exception('All style_set were corrupt')
