def add_or_update(data, item, value):
data = data.splitlines()<EOL>data = [bytearray(x) for x in data]<EOL>conf = [x for x in data if x.strip() and x.strip().split()[<NUM_LIT:0>] == item]<EOL>if conf:<EOL><INDENT>conf[<NUM_LIT:0>][:] = conf[<NUM_LIT:0>].strip().split()[<NUM_LIT:0>] + "<STR_LIT:U+0020>" + value<EOL><DEDENT>else:<EOL><INDENT>comments = [x for x in data if x.strip().startswith("<STR_LIT:#>")<EOL>and len(x.split("<STR_LIT:#>")) >= <NUM_LIT:2><EOL>and x.split("<STR_LIT:#>")[<NUM_LIT:1>].split()<EOL>and x.split("<STR_LIT:#>")[<NUM_LIT:1>].split()[<NUM_LIT:0>] == item]<EOL>if comments:<EOL><INDENT>comments[<NUM_LIT:0>][:] = comments[<NUM_LIT:0>].split("<STR_LIT:#>")[<NUM_LIT:1>].split()[<NUM_LIT:0>] + "<STR_LIT:U+0020>" + value<EOL><DEDENT>else:<EOL><INDENT>data.append(item + "<STR_LIT:U+0020>" + value + "<STR_LIT:\n>")<EOL><DEDENT><DEDENT>return "<STR_LIT:\n>".join([str(x) for x in data])<EOL>
Add or update value in configuration file format used by proftpd.

Args:
    data (str): Configuration file as string.
    item (str): What option will be added/updated.
    value (str): Value of option.

Returns:
    str: updated configuration