code: def change_data_format(files):
      for data_file_in in files:
          logging.info("Change data format: {}".format(data_file_in))
          data_file_out = data_file_in.replace(".in", ".out")
          words, labels = [], []
          with open(
              data_file_out, "w", encoding="utf-8"
          ) as output_file:
              with open(
                  data_file_in, "r", encoding="utf-8"
              ) as file_input:
                  for line in file_input.readlines():
                      word = line.strip().split(" ")[0]
                      label = line.strip().split(" ")[-1]
                      # here we dont do "DOCSTART" check
                      if len(line.strip()) == 0:
                          l = [
                              label
                              for label in labels
                              if len(label) > 0
                          ]
                          w = [word for word in words if len(word) > 0]
                          assert len(l) == len(w)
                          l, w = " ".join(l), " ".join(w)
                          output_file.write(l + "\t" + w + "\n")
                          words, labels = [], []
                      words.append(word)
                      labels.append(label)
          logging.info("Change data done: {}".format(data_file_out))
  
label_desc: Use image node_id 1 for calling a global function with example usage: change_data_format(files) without return types