code: def cli(sys_argv):
      parser = argparse.ArgumentParser(
          description="This script preprocess a dataset",
          prog="ludwig preprocess",
          usage="%(prog)s [options]",
      )
  
      # ---------------
      # Data parameters
      # ---------------
      parser.add_argument(
          "--dataset",
          help="input data file path. "
          "If it has a split column, it will be used for splitting "
          "(0: train, 1: validation, 2: test), "
          "otherwise the dataset will be randomly split",
      )
      parser.add_argument(
          "--training_set", help="input train data file path"
      )
      parser.add_argument(
          "--validation_set", help="input validation data file path"
      )
      parser.add_argument(
          "--test_set", help="input test data file path"
      )
  
      parser.add_argument(
          "--training_set_metadata",
          help="input metadata JSON file path. An intermediate preprocessed file "
          "containing the mappings of the input file created "
          "the first time a file is used, in the same directory "
          "with the same name and a .json extension",
      )
  
      parser.add_argument(
          "--data_format",
          help="format of the input data",
          default="auto",
          choices=[
              "auto",
              "csv",
              "excel",
              "feather",
              "fwf",
              "hdf5",
              "html" "tables",
              "json",
              "jsonl",
              "parquet",
              "pickle",
              "sas",
              "spss",
              "stata",
              "tsv",
          ],
      )
  
      # ----------------
      # Model parameters
      # ----------------
      preprocessing_def = parser.add_mutually_exclusive_group(
          required=True
      )
      preprocessing_def.add_argument(
          "-pc",
          "--preprocessing_config",
          dest="preprocessing_config",
          type=load_yaml,
          help="YAML file describing the preprocessing. "
          "Ignores --preprocessing_config."
          "Uses the same format of config, "
          "but ignores encoder specific parameters, "
          "decoder specific parameters, combiner and training parameters",
      )
      preprocessing_def.add_argument(
          "-pcs",
          "--preprocessing_config_str",
          type=yaml.safe_load,
          help="preproceesing config. "
          "Uses the same format of config, "
          "but ignores encoder specific parameters, "
          "decoder specific parameters, combiner and training parameters",
      )
  
      # ------------------
      # Runtime parameters
      # ------------------
      parser.add_argument(
          "-rs",
          "--random_seed",
          type=int,
          default=42,
          help="a random seed that is going to be used anywhere there is a call "
          "to a random number generator: data splitting, parameter "
          "initialization and training set shuffling",
      )
      parser.add_argument(
          "-b",
          "--backend",
          help="specifies backend to use for parallel / distributed execution, "
          "defaults to local execution or Horovod if called using horovodrun",
          choices=ALL_BACKENDS,
      )
      parser.add_argument(
          "-l",
          "--logging_level",
          default="info",
          help="the level of logging to use",
          choices=[
              "critical",
              "error",
              "warning",
              "info",
              "debug",
              "notset",
          ],
      )
  
      add_contrib_callback_args(parser)
      args = parser.parse_args(sys_argv)
  
      args.callbacks = args.callbacks or []
      for callback in args.callbacks:
          callback.on_cmdline("preprocess", *sys_argv)
  
      args.logging_level = get_logging_level_registry()[
          args.logging_level
      ]
      logging.getLogger("ludwig").setLevel(args.logging_level)
      global logger
      logger = logging.getLogger("ludwig.preprocess")
  
      args.backend = initialize_backend(args.backend)
      if args.backend.is_coordinator():
          print_ludwig("Preprocess", LUDWIG_VERSION)
  
      preprocess_cli(**vars(args))
  
file_path: ludwig/ludwig/preprocess.py
imports: import argparse
  import logging
  import sys
  from typing import List, Union
  import pandas
  import yaml
  from ludwig.api import LudwigModel
  from ludwig.backend import ALL_BACKENDS, Backend, initialize_backend
  from ludwig.callbacks import Callback
  from ludwig.contrib import add_contrib_callback_args
  from ludwig.globals import LUDWIG_VERSION
  from ludwig.utils.data_utils import load_yaml
  from ludwig.utils.defaults import default_random_seed
  from ludwig.utils.print_utils import get_logging_level_registry, print_ludwig
label_desc: Use image node_id 2 for calling a global function with example usage: cli(sys_argv) without return types