code: def get_stem_series(word_str_ser, suffix_len, can_replace_mask):
      """
      word_str_ser: input string column
      suffix_len: length of suffix to replace
      can_repalce_mask: bool array marking strings where to replace
      """
      NTHRD = 1024
      NBLCK = int(np.ceil(float(len(word_str_ser)) / float(NTHRD)))
  
      start_series = cudf.Series(
          cp.zeros(len(word_str_ser), dtype=cp.int32)
      )
      end_ser = word_str_ser.str.len()
  
      end_ar = end_ser._column.data_array_view(mode="read")
      can_replace_mask_ar = can_replace_mask._column.data_array_view(
          mode="read"
      )
  
      subtract_valid[NBLCK, NTHRD](
          end_ar, can_replace_mask_ar, suffix_len
      )
      return word_str_ser.str.slice_from(
          starts=start_series, stops=end_ser.fillna(0)
      )
  
imports: from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import
  from cuml.internals.safe_imports import gpu_only_import_from
label_desc: Use image node_id 5 for calling a global function with example usage: get_stem_series(word_str_ser, suffix_len, can_replace_mask) and returns: word_str_ser