def METHOD_NAME(**kwargs):
    if settings.RECAPTCHA_PUBLIC_KEY and settings.RECAPTCHA_PRIVATE_KEY:
        if settings.USE_RECAPTCHA_V3:
            score_threshold = get_setting('site', 'global', 'recaptchascorelimit')
            try:
                score_threshold = float(score_threshold)
            except ValueError:
                score_threshold = 0.5
            if score_threshold > 1 or score_threshold < 0:
                score_threshold = 0.5
            recaptcha_field = ReCaptchaField(label='', widget=ReCaptchaV3)
            # set required_score
            recaptcha_field.widget.attrs.update({'required_score': score_threshold})
            return recaptcha_field
        return ReCaptchaField(label='')
    return CaptchaField(**kwargs)