code: def add_parser(parser):
      """
      Add a key evaluation sub-parser to an existing parser.
  
      Parameters
      ----------
      parser : argparse parser instance
          Existing argparse parser object.
  
      Returns
      -------
      sub_parser : argparse sub-parser instance
          Key evaluation sub-parser.
  
      """
      import argparse
  
      # add key evaluation sub-parser to the existing parser
      p = parser.add_parser(
          "key",
          help="key evaluation",
          formatter_class=argparse.RawDescriptionHelpFormatter,
          description="""
      This program evaluates pairs of files containing global key annotations
      and predictions. Suffixes can be given to filter them from the list of
      files.
  
      Each file must contain only the global key and follow the syntax outlined
      in http://music-ir.org/mirex/wiki/2017:Audio_Key_Detection:
      `tonic mode`, where tonic is in {C, C#, Db, ... Cb} and mode in {'major',
      'maj', 'minor', 'min'}.
  
      To maintain compatibility with MIREX evaluation scores, use the
      --strict_fifth flag.
      """,
      )
      # set defaults
      p.set_defaults(
          eval=KeyEvaluation,
          mean_eval=KeyMeanEvaluation,
          sum_eval=None,
          load_fn=load_key,
      )
      # file I/O
      evaluation_io(p, ann_suffix=".key", det_suffix=".key.txt")
      p.add_argument(
          "--strict_fifth",
          dest="strict_fifth",
          action="store_true",
          help='Strict interpretation of the "fifth" category.',
      )
      # return the sub-parser and evaluation argument group
      return p
  
file_path: madmom/madmom/evaluation/key.py
imports: from collections import Counter
  from .None import EvaluationMixin, evaluation_io
  from ..io import load_key
label_desc: Use image node_id 3 for calling a global function with example usage: add_parser(parser) and returns: p