code: def _merge_shapelets(
      shapelet_heap,
      candidate_shapelets,
      max_shapelets_per_class,
      cls_idx,
  ):
      for shapelet in candidate_shapelets:
          if shapelet[5] == cls_idx and shapelet[0] > 0:
              if (
                  len(shapelet_heap) == max_shapelets_per_class
                  and shapelet[0] < shapelet_heap[0][0]
              ):
                  continue
  
              heapq.heappush(shapelet_heap, shapelet)
  
              if len(shapelet_heap) > max_shapelets_per_class:
                  heapq.heappop(shapelet_heap)
  
file_path: sktime/sktime/transformations/panel/_shapelet_transform_numba.py
imports: import heapq
  import math
  import numpy
  from sktime.utils.numba.njit import njit
label_desc: Use image node_id 7 for calling a global function with example usage: _merge_shapelets(shapelet_heap, candidate_shapelets, max_shapelets_per_class, cls_idx) without return types