class_docstr: Shapelet Transform.
  
  Original journal publication:
  @article{hills2014classification,
    title={Classification of time series by shapelet transformation},
    author={Hills, Jon and Lines, Jason and Baranauskas, Edgaras and Mapp,
    James and Bagnall, Anthony},
    journal={Data Mining and Knowledge Discovery},
    volume={28},
    number={4},
    pages={851--881},
    year={2014},
    publisher={Springer}
  }
  
  Parameters
  ----------
  min_shapelet_length                 : int, lower bound on candidate
  shapelet lengths (default = 3)
  max_shapelet_length                 : int, upper bound on candidate
  shapelet lengths (default = inf or series length)
  max_shapelets_to_store_per_class    : int, upper bound on number of
  shapelets to retain from each distinct class (default = 200)
  random_state                        : RandomState, int, or none: to
  control random state objects for deterministic results (default = None)
  verbose                             : int, level of output printed to
  the console (for information only) (default = 0)
  remove_self_similar                 : boolean, remove overlapping
  "self-similar" shapelets from the final transform (default = True)
  
  Attributes
  ----------
  predefined_ig_rejection_level       : float, minimum information gain
  required to keep a shapelet (default = 0.05)
  self.shapelets                      : list of Shapelet objects,
  the stored shapelets after a dataset has been processed
docstr: Remove self-similar shapelets from an input list.
  
  Note: this method assumes that shapelets are pre-sorted in descending order
  of quality (i.e. if two candidates are self-similar, the one with the later
  index will be removed)
  
  Parameters
  ----------
  shapelet_list: list of Shapelet objects
  
  Returns
  -------
  shapelet_list: list of Shapelet objects
docstr_tok: ["Remove","self-similar","shapelets","from","an","input","list",".","Note",":","this","method","assumes","that","shapelets","are","pre-sorted","in","descending","order","of","quality","(","i.e",".","if","two","candidates","are","self-similar",",","the","one","with","the","later","index","will","be","removed",")","Parameters","--","--","--","--","--","shapelet_list",":","list","of","Shapelet","objects","Returns","--","--","--","-","shapelet_list",":","list","of","Shapelet","objects"]
code: def remove_self_similar_shapelets(shapelet_list):
      """Remove self-similar shapelets from an input list.
  
      Note: this method assumes that shapelets are pre-sorted in descending order
      of quality (i.e. if two candidates are self-similar, the one with the later
      index will be removed)
  
      Parameters
      ----------
      shapelet_list: list of Shapelet objects
  
      Returns
      -------
      shapelet_list: list of Shapelet objects
      """
  
      def is_self_similar(shapelet_one, shapelet_two):
          """Check if two shapelets are similar.
  
          Notes
          -----
          IMPORTANT: it is assumed that shapelets are already in descending order
          of quality. This is preferable in the fit method as removing self-similar
          shapelets may be False so the sort needs to happen there in those cases,
          and avoids a second redundant sort here if it is set to True
          """
          # not self similar if from different series
          if shapelet_one.series_id != shapelet_two.series_id:
              return False
  
          if (shapelet_one.start_pos >= shapelet_two.start_pos) and (
              shapelet_one.start_pos
              <= shapelet_two.start_pos + shapelet_two.length
          ):
              return True
          if (shapelet_two.start_pos >= shapelet_one.start_pos) and (
              shapelet_two.start_pos
              <= shapelet_one.start_pos + shapelet_one.length
          ):
              return True
  
      # [s][2] will be a tuple with (info_gain,id,Shapelet), so we need to
      # access [2]
      to_return = [shapelet_list[0][2]]  # first shapelet must be ok
      for s in range(1, len(shapelet_list)):
          can_add = True
          for c in range(0, s):
              if is_self_similar(
                  shapelet_list[s][2], shapelet_list[c][2]
              ):
                  can_add = False
                  break
          if can_add:
              to_return.append(shapelet_list[s][2])
  
      return to_return
  
imports: import heapq
  import time
  import warnings
  from itertools import zip_longest
  from operator import itemgetter
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from sklearn import preprocessing
  from sklearn.utils import check_random_state
  from sklearn.utils.multiclass import class_distribution
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.validation import check_n_jobs
label_desc: Use image node_id 3 for calling the ShapeletTransform obj's underlying member method code with example usage: obj.remove_self_similar_shapelets(shapelet_list) and returns: to_return, False, True, True