def METHOD_NAME(
    key: str,
    *,
    value: Optional[str] = None,
    remove: bool = False,
    global_only: bool = False,
    commit_message: Optional[str] = None,
):
    """Add, update, or remove configuration values.
    Args:
        key(str): Config key.
        value(Optional[str]): Config value (Default value = None).
        remove(bool): Whether to remove values (Default value = False).
        global_only(bool): Whether to only update global config (Default value = False).
        commit_message(Optional[str]): Commit message for change (Default value = None).
    Raises:
        errors.ParameterError: If key wasn't found.
    Returns:
        The modified/removed value.
    """
    section, section_key = _split_section_and_key(key)
    if remove:
        remove_value(section, section_key, global_only=global_only)
    else:
        set_value(section, section_key, value, global_only=global_only)
    return value