code: def check_cli_verbose(default=3):
      
      args = sys.argv[1:]
      verbose = default + args.count("--verbose") - args.count("--quiet")
  
      for arg in args:
          if arg.startswith("-") and not arg.startswith("--"):
              verbose += arg[1:].count("v")
              verbose -= arg[1:].count("q")
      return verbose
docs: Check for presence of `--verbose`/`--quiet` or `-v`/`-q` without using argparse.