class_docstr: Displays a chatbot output showing both user submitted messages and responses. Supports a subset of Markdown including bold, italics, code, and images.
  Preprocessing: this component does *not* accept input.
  Postprocessing: expects function to return a {List[Tuple[str | None | Tuple, str | None | Tuple]]}, a list of tuples with user message and response messages. Messages should be strings, tuples, or Nones. If the message is a string, it can include Markdown. If it is a tuple, it should consist of (string filepath to image/video/audio, [optional string alt text]). Messages that are `None` are not displayed.
  
  Demos: chatbot_simple, chatbot_multimodal
code: def _process_chat_messages(
      self, chat_message: str | Tuple | List | Dict | None
  ) -> str | Dict | None:
      if chat_message is None:
          return None
      elif isinstance(chat_message, (tuple, list)):
          mime_type = processing_utils.get_mimetype(chat_message[0])
          return {
              "name": chat_message[0],
              "mime_type": mime_type,
              "alt_text": chat_message[1]
              if len(chat_message) > 1
              else None,
              "data": None,  # These last two fields are filled in by the frontend
              "is_file": True,
          }
      elif isinstance(
          chat_message, dict
      ):  # This happens for previously processed messages
          return chat_message
      elif isinstance(chat_message, str):
          # return self.md.render(chat_message)
          return str(self.md.convert(chat_message))
      else:
          raise ValueError(
              f"Invalid message for Chatbot component: {chat_message}"
          )
  
file_path: NeMo/nemo/collections/nlp/modules/common/chatbot_component.py
imports: from __future__ import annotations
  import warnings
  from markdown2 import Markdown
label_desc: Use image node_id 4 for calling the Chatbot obj's underlying member method code with example usage: obj._process_chat_messages(chat_message) and returns: None, dict, chat_message, str