code: def separate_into_sections(self, data_frame, labels_col='anno', labels_to_keep=[1,2], min_labels_in_sequence=100):
          
          sections = [[]]
          
          mask = data_frame[labels_col].apply(lambda x: x in labels_to_keep)
  
          for i,m in enumerate(mask):
              if m:
                  sections[-1].append(i)
                  
              if not m and len(sections[-1]) > min_labels_in_sequence:
                  sections.append([])
          
          sections.pop()
          
          sections = [self.rebuild_indexes(data_frame.iloc[s]) for s in sections]
          
          return sections
docs: Helper function to separate a time series into multiple sections based on a labeled column.
          
              :param data_frame: The data frame. It should have x, y, and z columns.
              :type data_frame: pandas.DataFrame
              :param labels_col: The column which has the labels we would like to separate the data_frame on on ('anno' default).
              :type labels_col: str
              :param labels_to_keep: The unique labele ids of the labels which we would like to keep, out of all the labels in the labels_col ([1, 2] default).
              :type labels_to_keep: list
              :param min_labels_in_sequence: The minimum number of samples which can make up a section (100 default).
              :type min_labels_in_sequence: int
              
              :return: A list of DataFrames, segmented accordingly.
              :rtype: list