def METHOD_NAME(self, value):
    slug_validator(
        value,
        message=gettext(
            'The custom URL must consist of letters, '
            'numbers, underscores or hyphens.'
        ),
    )
    if DeniedName.blocked(value) and not can_use_denied_names(
        self.context.get('request')
    ):
        raise serializers.ValidationError(
            gettext('This custom URL cannot be used.')
        )
    return value