def detect_intent_with_sentiment_analysis(project_id, session_id, texts,<EOL>language_code):
import dialogflow_v2beta1 as dialogflow<EOL>session_client = dialogflow.SessionsClient()<EOL>session_path = session_client.session_path(project_id, session_id)<EOL>print('<STR_LIT>'.format(session_path))<EOL>for text in texts:<EOL><INDENT>text_input = dialogflow.types.TextInput(<EOL>text=text, language_code=language_code)<EOL>query_input = dialogflow.types.QueryInput(text=text_input)<EOL>sentiment_config = dialogflow.types.SentimentAnalysisRequestConfig(<EOL>analyze_query_text_sentiment=True)<EOL>query_params = dialogflow.types.QueryParameters(<EOL>sentiment_analysis_request_config=sentiment_config)<EOL>response = session_client.detect_intent(<EOL>session=session_path, query_input=query_input,<EOL>query_params=query_params)<EOL>print('<STR_LIT:=>' * <NUM_LIT:20>)<EOL>print('<STR_LIT>'.format(response.query_result.query_text))<EOL>print('<STR_LIT>'.format(<EOL>response.query_result.intent.display_name,<EOL>response.query_result.intent_detection_confidence))<EOL>print('<STR_LIT>'.format(<EOL>response.query_result.fulfillment_text))<EOL>print('<STR_LIT>'.format(<EOL>response.query_result.sentiment_analysis_result<EOL>.query_text_sentiment.score))<EOL>print('<STR_LIT>'.format(<EOL>response.query_result.sentiment_analysis_result<EOL>.query_text_sentiment.magnitude))<EOL><DEDENT>
Returns the result of detect intent with texts as inputs and analyzes the
    sentiment of the query text.

    Using the same `session_id` between requests allows continuation
    of the conversaion.