def METHOD_NAME(self, document_result):
    if isinstance(document_result, RecognizePiiEntitiesResult):
        return _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES
    if isinstance(document_result, RecognizeEntitiesResult):
        return _AnalyzeActionsType.RECOGNIZE_ENTITIES
    if isinstance(document_result, RecognizeLinkedEntitiesResult):
        return _AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES
    if isinstance(document_result, AnalyzeSentimentResult):
        return _AnalyzeActionsType.ANALYZE_SENTIMENT
    if isinstance(document_result, ExtractKeyPhrasesResult):
        return _AnalyzeActionsType.EXTRACT_KEY_PHRASES
    raise ValueError("Your action result doesn't match any of the action types")