code: def split_column_dataset(
      first_count: int,
      second_count: int,
      out_folder,
      dataset,
      first_filename,
      second_filename,
      tag_col=-1,
  ):
      """
      Splits a single column tagged dataset into two files according to the amount of examples
      requested to be included in each file.
      first_count (int) : the amount of examples to include in the first split file
      second_count (int) : the amount of examples to include in the second split file
      out_folder (str) : the folder in which the result files will be stored
      dataset (str) : the path to the original data file
      first_filename (str) : the name of the first split file
      second_filename (str) : the name of the second split file
      tag_col (int) : the index of the tag column
      """
      lines = read_column_tagged_file(dataset, tag_col=tag_col)
      num_of_examples = len(lines)
      assert (
          first_count + second_count <= num_of_examples
          and first_count > 0
      )
      selected_lines = random.sample(lines, first_count + second_count)
      first_data = selected_lines[:first_count]
      second_data = selected_lines[first_count:]
      write_column_tagged_file(
          out_folder + os.sep + first_filename, first_data
      )
      if second_count != 0:
          write_column_tagged_file(
              out_folder + os.sep + second_filename, second_data
          )
  
imports: from __future__ import absolute_import, division, print_function
  import csv
  import os
  import random
  import sys
  from abc import ABC
  from io import open
  from typing import List, Tuple
label_desc: Use image node_id 5 for calling a global function with example usage: split_column_dataset(first_count, second_count, out_folder, dataset, first_filename, second_filename, tag_col) without return types