code: def _print_bot_output(
      message: Dict[Text, Any],
      is_latest_message: bool = False,
      color: Text = rasa.shared.utils.io.bcolors.OKBLUE,
  ) -> Optional[questionary.Question]:
      if "buttons" in message:
          question = print_buttons(message, is_latest_message, color)
          if question:
              return question
  
      if "text" in message:
          rasa.shared.utils.cli.print_color(
              message["text"], color=color
          )
  
      if "image" in message:
          rasa.shared.utils.cli.print_color(
              "Image: " + message["image"], color=color
          )
  
      if "attachment" in message:
          rasa.shared.utils.cli.print_color(
              "Attachment: " + message["attachment"], color=color
          )
  
      if "elements" in message:
          rasa.shared.utils.cli.print_color("Elements:", color=color)
          for idx, element in enumerate(message["elements"]):
              rasa.shared.utils.cli.print_color(
                  cli_utils.element_to_string(element, idx), color=color
              )
  
      if "quick_replies" in message:
          rasa.shared.utils.cli.print_color(
              "Quick Replies:", color=color
          )
          for idx, element in enumerate(message["quick_replies"]):
              rasa.shared.utils.cli.print_color(
                  cli_utils.button_to_string(element, idx), color=color
              )
  
      if "custom" in message:
          rasa.shared.utils.cli.print_color("Custom json:", color=color)
          rasa.shared.utils.cli.print_color(
              rasa.shared.utils.io.json_to_string(message["custom"]),
              color=color,
          )
  
      return None
  
imports: import asyncio
  import json
  import logging
  import os
  from typing import Any, AsyncGenerator, Dict, List, Optional, Text, overload
  import aiohttp
  import questionary
  from aiohttp import ClientTimeout
  from prompt_toolkit.styles import Style
  import rasa.shared.utils.cli
  import rasa.shared.utils.io
  from rasa.cli import utils
  from rasa.core import utils
  from rasa.core.channels.rest import RestInput
  from rasa.core.constants import DEFAULT_SERVER_URL, DEFAULT_STREAM_READING_TIMEOUT
  from rasa.shared.constants import INTENT_MESSAGE_PREFIX
  from rasa.shared.utils.io import DEFAULT_ENCODING
label_desc: Use image node_id 2 for calling a global function with example usage: _print_bot_output(message, is_latest_message, color) and returns: None, question