code: def add_parser(parser):
      """
      Add a note evaluation sub-parser to an existing parser.
  
      Parameters
      ----------
      parser : argparse parser instance
          Existing argparse parser object.
  
      Returns
      -------
      sub_parser : argparse sub-parser instance
          Note evaluation sub-parser.
      parser_group : argparse argument group
          Note evaluation argument group.
  
      """
      import argparse
  
      # add tempo evaluation sub-parser to the existing parser
      p = parser.add_parser(
          "notes",
          help="note evaluation",
          formatter_class=argparse.RawDescriptionHelpFormatter,
          description="""
      This program evaluates pairs of files containing the note annotations and
      detections. Suffixes can be given to filter them from the list of files.
  
      Each line represents a note and must have the following format with values
      being separated by whitespace [brackets indicate optional values]:
      `onset_time MIDI_note [duration [velocity]]`
  
      Lines starting with # are treated as comments and are ignored.
  
      """,
      )
      # set defaults
      p.set_defaults(
          eval=NoteEvaluation,
          sum_eval=NoteSumEvaluation,
          mean_eval=NoteMeanEvaluation,
          load_fn=load_notes,
      )
      # file I/O
      evaluation_io(p, ann_suffix=".notes", det_suffix=".notes.txt")
      # evaluation parameters
      g = p.add_argument_group("note evaluation arguments")
      g.add_argument(
          "-w",
          dest="window",
          action="store",
          type=float,
          default=0.025,
          help="evaluation window (+/- the given size) "
          "[seconds, default=%(default)s]",
      )
      g.add_argument(
          "--delay",
          action="store",
          type=float,
          default=0.0,
          help="add given delay to all detections [seconds]",
      )
      # return the sub-parser and evaluation argument group
      return p, g
  
imports: from __future__ import absolute_import, division, print_function
  import warnings
  import numpy
  from .None import evaluation_io, MultiClassEvaluation, SumEvaluation, MeanEvaluation
  from .onsets import onset_evaluation, OnsetEvaluation
  from ..io import load_notes
label_desc: Use image node_id 3 for calling a global function with example usage: add_parser(parser) and returns: p,  g