code: def generate_words(
      dfts,
      bigrams,
      skip_grams,
      window_size,
      breakpoints,
      word_length,
      letter_bits,
  ):
      """Generate words."""
      needed_size = dfts.shape[1]
      if bigrams:
          # allocate memory for bigrams
          needed_size += max(0, dfts.shape[1] - window_size)
      if skip_grams:
          # allocate memory for 2- and 3-skip-grams
          needed_size += max(0, 2 * dfts.shape[1] - 5 * window_size)
  
      words = np.zeros((dfts.shape[0], needed_size), dtype=np.uint32)
  
      letter_bits = np.uint32(letter_bits)
      word_bits = (
          word_length * letter_bits
      )  # dfts.shape[2] * letter_bits
  
      # special case: binary breakpoints
      if breakpoints.shape[1] == 2:
          vector = np.zeros((breakpoints.shape[0]), dtype=np.float32)
          for i in range(breakpoints.shape[0]):
              vector[i] = breakpoints.shape[1] ** i
  
          for a in prange(dfts.shape[0]):
              match = (dfts[a] <= breakpoints[:, 0]).astype(np.float32)
              words[a, : dfts.shape[1]] = np.dot(match, vector).astype(
                  np.uint32
              )
  
      # general case: alphabet-size many breakpoints
      else:
          for a in prange(dfts.shape[0]):
              for i in range(word_length):  # range(dfts.shape[2]):
                  words[a, : dfts.shape[1]] = (
                      words[a, : dfts.shape[1]] << letter_bits
                  ) | np.digitize(
                      dfts[a, :, i], breakpoints[i], right=True
                  )
  
      # add bigrams
      if bigrams:
          for a in prange(0, dfts.shape[1] - window_size):
              first_word = words[:, a]
              second_word = words[:, a + window_size]
              words[:, dfts.shape[1] + a] = (
                  first_word << word_bits
              ) | second_word
  
      # # add 2,3-skip-grams
      # if skip_grams:
      #     for s in range(2, 4):
      #         for a in range(0, dfts.shape[1] - s * window_size):
      #             first_word = words[:, a]
      #             second_word = words[:, a + s * window_size]
      #             words[:, dfts.shape[1] + a] = (first_word << word_bits) | second_word
  
      return words
  
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 7 for calling a global function with example usage: generate_words(dfts, bigrams, skip_grams, window_size, breakpoints, word_length, letter_bits) and returns: words