code: def split(input_path, output1, output2, split):
      with open(input_path) as file:
          lines = file.readlines()
  
      random.shuffle(lines)
      split_idx = int(len(lines) * split)
  
      with open(output1, "w") as f:
          for line in lines[:split_idx]:
              line = line if line.endswith("\n") else line + "\n"
              f.write(line)
  
      with open(output2, "w") as f:
          for line in lines[split_idx:]:
              line = line if line.endswith("\n") else line + "\n"
              f.write(line)
  
label_desc: Use image node_id 1 for calling a global function with example usage: split(input_path, output1, output2, split) without return types