def set_labels(self, labels):
if not isinstance(labels, string_types) and len(labels) != self.n_subjs:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>'.format(len(labels), self.n_subjs))<EOL><DEDENT>self.labels = labels<EOL>
Parameters
----------
labels: list of int or str
    This list will be checked to have the same size as

Raises
------
ValueError
    if len(labels) != self.n_subjs