code: def args_kvp_nodup(s):
      
      if s is None:
          return {}
      d = {}
      for item in [e.strip() for e in s.split(",")]:
          try:
              key, value = item.split("=", 1)
          except ValueError:
              msg = "argument item '{}' not in form key=value".format(item)
              if _argparse_is_dumb:
                  _alog.warn(msg)
              raise ValueError(msg)
          if key in d:
              msg = "Duplicate key for '{}' not allowed".format(key)
              if _argparse_is_dumb:
                  _alog.warn(msg)
              raise ValueError(msg)
          d[key] = value
      return d
docs: Parse argument string as key=value pairs separated by commas.
  
      :param s: Argument string
      :return: Parsed value
      :rtype: dict
      :raises: ValueError for format violations or a duplicated key.