code: def add_cross_val_metrics_parser(subparsers, formatter_class):
      subparser = subparsers.add_parser(
          "cross-val-metrics",
          formatter_class=formatter_class,
          help="Compute cross-validation metrics on a given dataset",
      )
      subparser.add_argument(
          "dataset_path", type=str, help="Path to the dataset file"
      )
      subparser.add_argument(
          "output_path",
          type=str,
          help="Destination path for the json metrics",
      )
      subparser.add_argument(
          "-c",
          "--config_path",
          type=str,
          help="Path to a NLU engine config file",
      )
      subparser.add_argument(
          "-n",
          "--nb_folds",
          type=int,
          default=5,
          help="Number of folds to use for the " "cross-validation",
      )
      subparser.add_argument(
          "-t",
          "--train_size_ratio",
          default=1.0,
          type=float,
          help="Fraction of the data that we want to use for "
          "training (between 0 and 1)",
      )
      subparser.add_argument(
          "-s",
          "--exclude_slot_metrics",
          action="store_true",
          help="Fraction of the data that we want to use for "
          "training (between 0 and 1)",
      )
      subparser.add_argument(
          "-i",
          "--include_errors",
          action="store_true",
          help="Include parsing errors in the output",
      )
      subparser.add_argument(
          "-v",
          "--verbosity",
          action="count",
          default=0,
          help="Increase output verbosity",
      )
      subparser.set_defaults(func=_cross_val_metrics)
      return subparser
  
file_path: snips-nlu/snips_nlu/cli/metrics.py
imports: from __future__ import print_function, unicode_literals
label_desc: Use image node_id 2 for calling a global function with example usage: add_cross_val_metrics_parser(subparsers, formatter_class) and returns: subparser