def METHOD_NAME(
    name: str,
    value: Any,
):
    """Set preference
    Parameters
    ----------
    name : str
        Preference name
    value : Any
        Preference value
    """
    current_user = get_current_user()
    updated_preferences = dataclasses.replace(current_user.preferences, **{name: value})  # type: ignore
    updated_user = dataclasses.replace(current_user, preferences=updated_preferences)  # type: ignore
    set_current_user(updated_user)