code: def predict(self, X):
          
          check_is_fitted(self, ["event_pat_", "event_var_"])
          X = check_array(X)
          segments, test_ll = self.find_events(X)
          return np.argmax(segments, axis=1)
docs: Applies learned event segmentation to new testing dataset
  
          Alternative function for segmenting a new dataset after using
          fit() to learn a sequence of events, to comply with the sklearn
          Classifier interface
  
          Parameters
          ----------
          X: timepoint by voxel ndarray
              fMRI data to segment based on previously-learned event patterns
  
          Returns
          -------
          Event label for each timepoint