code: def get_sfs_idxs(sfs, last=True):
      
      if last:
          feature_szs = [sfs_feats.features.size()[-1] for sfs_feats in sfs]
          sfs_idxs = list(np.where(np.array(feature_szs[:-1]) != np.array(feature_szs[1:]))[0])
          if feature_szs[0] != feature_szs[1]: sfs_idxs = [0] + sfs_idxs
      else: sfs_idxs = list(range(len(sfs)))
      return sfs_idxs
docs: Return the saved feature indexes that will be concatenated
      Inputs:
          sfs (list): saved features by hook function, in other words intermediate activations
          last (bool): whether to concatenate only last different activation, or all from the encoder model