code: def is_consecutive(self):
          
  
          if (self.labels[-1] - self.labels[0] + 1) == self.nlabels:
              return True
          else:
              return False
docs: Determine whether or not the non-zero labels in the segmentation
          image are consecutive (i.e. no missing values).