code: def add_sepval_cli(parser, opt, dest, choices, *, sep=",", **kwargs):
      #    if opt is True:
      #        parser.add_argument(f'--{dest}', action='append', **kwargs)
      #    elif isinstance(opt, str) and opt.startswith('-'):
      #        parser.add_argument(opt, dest=dest, action='append', **kwargs)
      #    else:
      #        arg = dest if not opt else opt
      #        kwargs.setdefault('nargs', '+')
      #        parser.add_argument(arg, dest=dest, action='append', **kwargs)
      if not isinstance(opt, str):
          parser.error(f"opt must be a string, got {opt!r}")
      elif opt.startswith("-"):
          parser.add_argument(opt, dest=dest, action="append", **kwargs)
      else:
          kwargs.setdefault("nargs", "+")
          # kwargs.setdefault('metavar', opt.upper())
          parser.add_argument(opt, dest=dest, action="append", **kwargs)
  
      def process_args(args, *, argv=None):
          ns = vars(args)
  
          # XXX Use normalize_selection()?
          if isinstance(ns[dest], str):
              ns[dest] = [ns[dest]]
          selections = []
          for many in ns[dest] or ():
              for value in many.split(sep):
                  if value not in choices:
                      parser.error(f"unknown {dest} {value!r}")
                  selections.append(value)
          ns[dest] = selections
  
      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 12 for calling a global function with example usage: add_sepval_cli(parser, opt, dest, choices) and returns: process_args