'parse key-value style arguments'

def parse_kv_args(self, args):

    for arg in ['name', 'item']:
        try:
            arg_raw = args.pop(arg, None)
            if (arg_raw is None):
                continue
            parsed = str(arg_raw)
            setattr(self, arg, parsed)
        except ValueError:
            raise AnsibleError("can't    parse    arg    {}={}    as    string".format(arg, arg_raw))
    if args:
        raise AnsibleError(('unrecognized    arguments    to    with_sequence:    %r' % args.keys()))
