def METHOD_NAME(self, settings):
    res = False
    scene = bpy.context.scene
    # UPSCALER_FSR2 works only if denoiser is enabled
    self.is_upscaled = settings['enable'] and self.is_denoised
    if self.is_upscaled:
        res |= self.rpr_context.set_parameter(pyrpr.CONTEXT_UPSCALER, pyrpr.UPSCALER_FSR2)
        res |= self.rpr_context.set_parameter(pyrpr.CONTEXT_FSR2_QUALITY,
                                             getattr(pyrpr, scene.rpr.viewport_upscale_quality))
    else:
        res |= self.rpr_context.set_parameter(pyrpr.CONTEXT_UPSCALER, pyrpr.UPSCALER_NONE)
    return res