def METHOD_NAME(
    evt: CommandEvent, portal: po.Portal, key: str, value: str, cmd: str
) -> Awaitable[EventID]:
    if not key or value is None:
        return evt.reply(f"**Usage:** `$cmdprefix+sp config {cmd} <key> <value>`")
    arr = util.recursive_get(portal.local_config, key)
    if not arr:
        return evt.reply(
            f"`{key}` not found in config. Maybe do `$cmdprefix+sp config set {key} []` first?"
        )
    elif not isinstance(arr, list):
        return evt.reply("`{key}` does not seem to be an array.")
    elif cmd == "add":
        if value in arr:
            return evt.reply(f"The array at `{key}` already contains {_str_value(value)}".rstrip())
        arr.append(value)
        return evt.reply(f"Successfully added {_str_value(value)} to the array at `{key}`")
    else:
        if value not in arr:
            return evt.reply(f"The array at `{key}` does not contain {_str_value(value)}")
        arr.remove(value)
        return evt.reply(f"Successfully removed {_str_value(value)} from the array at `{key}`")