code: def main(args=None):
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "--csv_filename",
          type=str,
          default=None,
          help="CSV file to read in",
      )
      parser.add_argument(
          "--out_dir",
          type=str,
          default=None,
          help="Where to write the output files",
      )
      parser.add_argument(
          "--sentiment_column",
          type=int,
          default=2,
          help="Column with the sentiment",
      )
      parser.add_argument(
          "--text_column",
          type=int,
          default=3,
          help="Column with the text",
      )
      parser.add_argument(
          "--short_name",
          type=str,
          default="sb10k",
          help="short name to use when writing files",
      )
  
      parser.add_argument(
          "--split",
          type=lambda x: Split[x.upper()],
          default=Split.TRAIN_DEV_TEST,
          help="How to split the resulting data",
      )
  
      args = parser.parse_args(args=args)
  
      snippets = process_utils.read_snippets(
          args.csv_filename,
          args.sentiment_column,
          args.text_column,
          "de",
          MAPPING,
      )
  
      print(len(snippets))
      random.shuffle(snippets)
  
      os.makedirs(args.out_dir, exist_ok=True)
      if args.split is Split.TRAIN_DEV_TEST:
          process_utils.write_splits(
              args.out_dir,
              snippets,
              (
                  process_utils.Split(
                      "%s.train.json" % args.short_name, 0.8
                  ),
                  process_utils.Split(
                      "%s.dev.json" % args.short_name, 0.1
                  ),
                  process_utils.Split(
                      "%s.test.json" % args.short_name, 0.1
                  ),
              ),
          )
      elif args.split is Split.TRAIN_DEV:
          process_utils.write_splits(
              args.out_dir,
              snippets,
              (
                  process_utils.Split(
                      "%s.train.json" % args.short_name, 0.9
                  ),
                  process_utils.Split(
                      "%s.dev.json" % args.short_name, 0.1
                  ),
              ),
          )
      elif args.split is Split.TEST:
          process_utils.write_list(
              os.path.join(
                  args.out_dir, "%s.test.json" % args.short_name
              ),
              snippets,
          )
      else:
          raise ValueError("Unknown split method {}".format(args.split))
  
imports: import argparse
  import os
  import random
  from enum import Enum
  import stanza.utils.datasets.sentiment.process_utils
label_desc: Use image node_id 1 for calling a global function with example usage: main(args) without return types