(aligned_labels)
in current version, labels should start from 0 and
        are consecutive integers
in current version, labels should start from 0 and
        are consecutive integers
in current version labels should start from 0 and are consecutive integers
def check_label_starts_from_zero(aligned_labels):
        """
        in current version, labels should start from 0 and
        are consecutive integers
        """
        if aligned_labels[0] != 0:
            raise ValueError('label should starts from 0')
        for prev, aft in zip(aligned_labels[:-1], aligned_labels[1:]):
            if prev + 1 != aft:
                raise ValueError('labels should be a sequence of consecutive integers, '
                                 'but got {} and {}'.format(prev, aft))
def check_label_starts_from_zero ( aligned_labels ) : if aligned_labels [ 0 ] != 0 : raise ValueError ( 'label should starts from 0' ) for prev , aft in zip ( aligned_labels [ : - 1 ] , aligned_labels [ 1 : ] ) : if prev + 1 != aft : raise ValueError ( 'labels should be a sequence of consecutive integers, ' 'but got {} and {}' . format ( prev , aft ) )