def METHOD_NAME(
    self, user: AbstractUser, element: ElementForUpdate, **kwargs
) -> Element:
    """
    Updates and element with values. Will also check if the values are allowed
    to be set on the element first.
    :param user: The user trying to update the element.
    :param element: The element that should be updated.
    :param values: The values that should be set on the element.
    :param kwargs: Additional attributes of the element.
    :return: The updated element.
    """
    CoreHandler().check_permissions(
        user,
        UpdateElementOperationType.type,
        workspace=element.page.builder.workspace,
        context=element,
    )
    element = self.handler.METHOD_NAME(element, **kwargs)
    element_updated.send(self, element=element, user=user)
    return element