code: def main(argv: Optional[List[str]] = None) -> None:
      """
      Handle command line arguments and get things started.
  
      Parameters
      ----------
      argv: Optional[List[str]], default=None
          List of arguments, as if specified on the command-line. If ``None``,
          then ``sys.argv[1:]`` is used instead.
      """
      # Get command line arguments
      parser = argparse.ArgumentParser(
          description="Computes evaluation metrics from prediction files after "
          "you have run an experiment.",
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
      parser.add_argument(
          "examples_file", help="SKLL input file with labeled examples"
      )
      parser.add_argument(
          "predictions_file", help="file with predictions from SKLL"
      )
      parser.add_argument(
          "metric_names", help="metrics to compute", nargs="+"
      )
      parser.add_argument(
          "--method",
          "-m",
          help="How to generate a prediction from the class "
          "probabilities. Supported methods are 'highest' "
          "(default) and 'expected_value' (only works with"
          " integer classes).",
      )
      parser.add_argument(
          "--version",
          action="version",
          version=f"%(prog)s {__version__}",
      )
      args = parser.parse_args(argv)
  
      supported_prediction_methods = {"highest", "expected_value"}
      if (args.method is not None) and (
          args.method not in supported_prediction_methods
      ):
          raise KeyError(
              f"Unrecognized prediction method '{args.method}'. "
              "Supported methods are 'highest' and "
              "'expected_value'."
          )
  
      scores = compute_eval_from_predictions(
          args.examples_file,
          args.predictions_file,
          args.metric_names,
          args.method,
      )
  
      for metric_name in args.metric_names:
          print(
              f"{scores[metric_name]}\t{metric_name}\t{args.predictions_file}"
          )
  
file_path: skll/skll/utils/commandline/compute_eval_from_predictions.py
imports: import argparse
  import csv
  import logging
  from pathlib import Path
  from typing import Dict, List, Optional, Union
  import numpy
  from skll.data import Reader, safe_float
  from skll.metrics import use_score_func
  from skll.types import PathOrStr
  from skll.version import __version__
label_desc: Use image node_id 3 for calling a global function with example usage: main(argv) without return types