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
docstr: Parameters:
      y: List of tuples representing the message and response pairs. Each message and response should be a string, which may be in Markdown format.  It can also be a tuple whose first element is a string filepath or URL to an image/video/audio, and second (optional) element is the alt text, in which case the media file is displayed. It can also be None, in which case that message is not displayed.
  Returns:
      List of tuples representing the message and response. Each message and response will be a string of HTML, or a dictionary with media information.
docstr_tok: ["Parameters",":","y",":","List","of","tuples","representing","the","message","and","response","pairs",".","Each","message","and","response","should","be","a","string",",","which","may","be","in","Markdown","format",".","It","can","also","be","a","tuple","whose","first","element","is","a","string","filepath","or","URL","to","an","image\/video\/audio",",","and","second","(","optional",")","element","is","the","alt","text",",","in","which","case","the","media","file","is","displayed",".","It","can","also","be","None",",","in","which","case","that","message","is","not","displayed",".","Returns",":","List","of","tuples","representing","the","message","and","response",".","Each","message","and","response","will","be","a","string","of","HTML",",","or","a","dictionary","with","media","information","."]
code: def postprocess(
      self,
      y: List[
          Tuple[
              str | Tuple | List | Dict | None,
              str | Tuple | List | Dict | None,
          ]
      ],
  ) -> List[Tuple[str | Dict | None, str | Dict | None]]:
      """
      Parameters:
          y: List of tuples representing the message and response pairs. Each message and response should be a string, which may be in Markdown format.  It can also be a tuple whose first element is a string filepath or URL to an image/video/audio, and second (optional) element is the alt text, in which case the media file is displayed. It can also be None, in which case that message is not displayed.
      Returns:
          List of tuples representing the message and response. Each message and response will be a string of HTML, or a dictionary with media information.
      """
      if y is None:
          return []
      processed_messages = []
      for message_pair in y:
          assert isinstance(
              message_pair, (tuple, list)
          ), f"Expected a list of lists or list of tuples. Received: {message_pair}"
          assert (
              len(message_pair) == 2
          ), f"Expected a list of lists of length 2 or list of tuples of length 2. Received: {message_pair}"
          processed_messages.append(
              (
                  #                    '<pre style="font-family: var(--font)">' +
                  #                    message_pair[0] + "</pre>",
                  message_pair[0],
                  self._process_chat_messages(message_pair[1]),
              )
          )
      return processed_messages
  
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 5 for calling the Chatbot obj's underlying member method code with example usage: obj.postprocess(y) and returns: processed_messages, list