class_docstr: (Experimental) Text Analysis agent, a subclass of ConversableAgent designed to analyze text as instructed.
docstr: Analyzes the given text as instructed, and returns the analysis.
code: def analyze_text(self, text_to_analyze, analysis_instructions):
      """Analyzes the given text as instructed, and returns the analysis."""
      # Assemble the message.
      text_to_analyze = "# TEXT\n" + text_to_analyze + "\n"
      analysis_instructions = (
          "# INSTRUCTIONS\n" + analysis_instructions + "\n"
      )
      msg_text = "\n".join(
          [
              analysis_instructions,
              text_to_analyze,
              analysis_instructions,
          ]
      )  # Repeat the instructions.
      # Generate and return the analysis string.
      return self.generate_oai_reply(
          [{"role": "user", "content": msg_text}], None, None
      )[1]
  
file_path: autogen/autogen/agentchat/contrib/text_analyzer_agent.py
imports: from autogen import oai
  from autogen.agentchat.agent import Agent
  from autogen.agentchat.assistant_agent import ConversableAgent
  from typing import Callable, Dict, Optional, Union, List, Tuple, Any
label_desc: Use image node_id 3 for calling the TextAnalyzerAgent obj's underlying member method code with example usage: obj.analyze_text(text_to_analyze, analysis_instructions) and returns: self