code: def add_progress_cli(parser, *, threshold=VERBOSITY, **kwargs):
      parser.add_argument(
          "--progress",
          dest="track_progress",
          action="store_const",
          const=True,
      )
      parser.add_argument(
          "--no-progress", dest="track_progress", action="store_false"
      )
      parser.set_defaults(track_progress=True)
  
      def process_args(args, *, argv=None):
          if args.track_progress:
              ns = vars(args)
              verbosity = ns.get("verbosity", VERBOSITY)
              if verbosity <= threshold:
                  args.track_progress = track_progress_compact
              else:
                  args.track_progress = track_progress_flat
  
      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 16 for calling a global function with example usage: add_progress_cli(parser) and returns: process_args