code: def create_bag_feature_selection(
      n_instances,
      relevant_features_idx,
      feature_names,
      sfa_words,
      remove_repeat_words,
  ):
      """Create bag, feature selection."""
      relevant_features = Dict.empty(
          key_type=types.uint32, value_type=types.uint32
      )
      for k, v in zip(
          feature_names[relevant_features_idx],
          np.arange(len(relevant_features_idx), dtype=np.uint32),
      ):
          relevant_features[k] = v
  
      if remove_repeat_words:
          if 0 in relevant_features:
              del relevant_features[0]
  
      all_win_words = np.zeros(
          (n_instances, len(relevant_features_idx)), dtype=np.uint32
      )
      for j in range(sfa_words.shape[0]):
          for key in sfa_words[j]:
              if key in relevant_features:
                  all_win_words[j, relevant_features[key]] += 1
      return all_win_words, relevant_features
  
file_path: sktime/sktime/transformations/panel/dictionary_based/_sfa_fast_numba.py
imports: import math
  from warnings import simplefilter
  import numpy
  from sktime.utils.numba.njit import njit
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 11 for calling a global function with example usage: create_bag_feature_selection(n_instances, relevant_features_idx, feature_names, sfa_words, remove_repeat_words) and returns: all_win_words,  relevant_features