code: def add_verbosity_cli(parser):
      parser.add_argument("-q", "--quiet", action="count", default=0)
      parser.add_argument("-v", "--verbose", action="count", default=0)
  
      def process_args(args, *, argv=None):
          ns = vars(args)
          key = "verbosity"
          if key in ns:
              parser.error(f"duplicate arg {key!r}")
          ns[key] = max(
              0, VERBOSITY + ns.pop("verbose") - ns.pop("quiet")
          )
          return key
  
      return process_args
  
imports: import argparse
  import contextlib
  import logging
  import os
  import os.path
  import shutil
  import sys
  from .None import fsutil, strutil, iterutil, logging
label_desc: Use image node_id 10 for calling a global function with example usage: add_verbosity_cli(parser) and returns: process_args, key