def METHOD_NAME(self, text: str, language: str) -> Dict[str, Any]:
    if language not in self.detect_key_phrases_languages:
        raise DetectPIIValidationException(
            language, self.detect_key_phrases_languages
        )
    text_size = len(text)
    if text_size > 5000:
        raise TextSizeLimitExceededException(text_size)
    return CANNED_SENTIMENT_RESPONSE