docs: def exclude_args(parser, args, excluded_args, target):
      """Delete options that are not appropriate for a following code path; exit
      with an error if excluded options were passed in by the user.
  
      argparse generates a namespace with all options it knows, but not every
      attribute should be passed to all code paths (i.e. options about
      interpolation should not reach `run_from_ufos()`). This function can be run
      before entering a particular code path to clean up the kwargs passed to it.
  
      Exit with an error message if the user actually passed the options in.
      """
      msg = '"%s" option invalid for %s'
      for argname in excluded_args:
          if argname not in args:
              continue
          if args[argname]:
              optname = "--%s" % argname.replace("_", "-")
              parser.error(msg % (optname, target))
          del args[argname]