class_docstr: Do NOT use this directly, use its children.
class_docstr_tok: ["Do","NOT","use","this","directly",",","use","its","children","."]
docstr: Bot teacher: text = human message and label = bot response
  Human teacher:  text = bot message and label = human response
code: def _examples_from_convo(self, convo, label_agent):
      """
      Bot teacher: text = human message and label = bot response
      Human teacher:  text = bot message and label = human response
      """
      examples = []
      message_history = convo.pop("message_history")
      # adversarial human = human that triggered safety classifier at least once in convo
      adversarial_human = any(
          [
              m["sender"] == "human" and not self._is_safe(m)
              for m in message_history
          ]
      )
      for idx, m in enumerate(message_history):
          if self._filter_out_message(m, message_history):
              continue
          if m["sender"] == label_agent:
              context = message_history[:idx]
              text_context = [d["text"] for d in context]
              convo_metadata_fields = convo
              # if no context (1st message), skip
              if len(text_context) == 0:
                  continue
              parlai_msg = Message(
                  {
                      **convo_metadata_fields,
                      "text": "\n".join(text_context),
                      "labels": [m["text"]],
                      "label_info": m,
                      "episode_done": True,
                      "adversarial_human": adversarial_human,
                  }
              )
              examples.append(parlai_msg)
      return examples
  
imports: import os
  import json
  from copy import deepcopy
  from parlai.core.message import Message
  from parlai.utils.data import DatatypeHelper
  from parlai.core.teachers import ChunkTeacher
  from .build import build
label_desc: Use image node_id 10 for calling the BaseBB3DataTeacher obj's underlying member method code with example usage: obj._examples_from_convo(convo, label_agent) and returns: examples