def METHOD_NAME(
    *, db_session, notification: Notification, notification_in: NotificationUpdate
) -> Notification:
    """Updates a notification."""
    notification_data = notification.dict()
    update_data = notification_in.dict(
        skip_defaults=True,
        exclude={"filters"},
    )
    for field in notification_data:
        if field in update_data:
            setattr(notification, field, update_data[field])
    if notification_in.filters is not None:
        filters = [
            search_filter_service.get(db_session=db_session, search_filter_id=f.id)
            for f in notification_in.filters
        ]
        notification.filters = filters
    db_session.commit()
    return notification