def METHOD_NAME(self, attrs):
    """
    Validation for notification preference update form
    """
    notification_app = attrs.get('notification_app')
    notification_type = attrs.get('notification_type')
    notification_channel = attrs.get('notification_channel')
    notification_app_config = self.instance.notification_preference_config
    if notification_type and not notification_channel:
        raise ValidationError(
            'notification_channel is required for notification_type.'
        )
    if notification_channel and not notification_type:
        raise ValidationError(
            'notification_type is required for notification_channel.'
        )
    if not notification_app_config.get(notification_app, None):
        raise ValidationError(
            f'{notification_app} is not a valid notification app.'
        )
    if notification_type:
        notification_types = notification_app_config.get(notification_app).get('notification_types')
        if not notification_types.get(notification_type, None):
            raise ValidationError(
                f'{notification_type} is not a valid notification type.'
            )
    if notification_channel and notification_channel not in get_notification_channels():
        raise ValidationError(
            f'{notification_channel} is not a valid notification channel.'
        )
    return attrs