code: def prepare_dataset(output_folder, input_folder, tag):
      train_triples, valid_triples = [], []
  
      training_user_hist_keys = load_instance_file(
          os.path.join(input_folder, "train_{0}.txt".format(tag)),
          train_triples,
      )
      load_instance_file(
          os.path.join(input_folder, "valid_{0}.txt".format(tag)),
          valid_triples,
      )
      load_instance_file(
          os.path.join(input_folder, "test_{0}.txt".format(tag)),
          valid_triples,
          label="0",
      )
  
      load_user_behaviors(
          os.path.join(
              input_folder, "user_history_{0}.txt".format(tag)
          ),
          train_triples,
          training_user_hist_keys,
      )
  
      write_to_file(
          os.path.join(
              output_folder, "lightgcn_train_{0}.txt".format(tag)
          ),
          train_triples,
      )
      write_to_file(
          os.path.join(
              output_folder, "lightgcn_valid_{0}.txt".format(tag)
          ),
          valid_triples,
      )
  
imports: import codecs
  import pickle
  import time
  import os
  from datetime import datetime
  import random
  import numpy
  import math
  from multiprocessing import Process
  from utils.general import *
  from utils.data_helper import *
label_desc: Use image node_id 28 for calling a global function with example usage: prepare_dataset(output_folder, input_folder, tag) without return types