<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def args_kvp_nodup(s):
 """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. """

    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