def candidate_split_labels(data):
 groups = defaultdict(list)
 for attr in data.domain.attributes:
  for item in attr.attributes.items():
   groups[item].append(attr)
 by_keys = defaultdict(list)
 for ((key, _), attrs) in groups.items():
  by_keys[key].append(attrs)
 candidates = []
 for (key, groups) in by_keys.items():
  count = len(groups[0])
  if (all(((len(attrs) == count) for attrs in groups)) and (len(groups) > 1) and (count > 1)):
   candidates.append(key)
 return candidates

def candidate_split_labels ( data ) : groups = defaultdict ( list ) for attr in data . domain . attributes : for item in attr . attributes . items ( ) : groups [ item ] . append ( attr ) by_keys = defaultdict ( list ) for ( ( key , _ ) , attrs ) in groups . items ( ) : by_keys [ key ] . append ( attrs ) candidates = [ ] for ( key , groups ) in by_keys . items ( ) : count = len ( groups [ 0 ] ) if ( all ( ( ( len ( attrs ) == count ) for attrs in groups ) ) and ( len ( groups ) > 1 ) and ( count > 1 ) ) : candidates . append ( key ) return candidates
return candidate labels on which we can split the data .