code: def preprocess(
      lac, predicted_data, word_dict, use_gpu=False, batch_size=1
  ):
      result = []
      data_dict = {"text": predicted_data}
      processed = lac.lexical_analysis(
          data=data_dict, use_gpu=use_gpu, batch_size=batch_size
      )
      unk_id = word_dict["<unk>"]
      for index, data in enumerate(processed):
          result_i = {"processed": []}
          result_i["origin"] = predicted_data[index]
          for word in data["word"]:
              if word in word_dict:
                  _index = word_dict[word]
              else:
                  _index = unk_id
              result_i["processed"].append(_index)
          result.append(result_i)
      return result
  
imports: import io
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: preprocess(lac, predicted_data, word_dict, use_gpu, batch_size) and returns: result