class_docstr: Base world for running TOD model-model chats. Includes the following agents:
  
  * User utt agent
  * API call agent
      * Currently assumed to be same as system utt agent in script code, though used as if separate in this world for clarity
  * API responder agent
  * System utt agent
  * API schema groundinger agent (given to api call + response agent)
  * Goal groundinger agent (given to user)
  
  As is standard for ParlAI, these agents may be models or may be standalone classes that extend the "Agent" class. The models for these *are* expected to have their utterances in a standard format.
  
  We do expect these agents to be passed in with a set order (see above), since some assumptions of regular ParlAI Worlds (ex. task = agent[0], model = agent[1]) are broken here since there is no "task agent" and one agent can be two "roles" (ex. system agent also making API calls)
docstr: Preempt with goal and schema-based intent schemas.
  
  As a logging hack, we stick the schema gronding in as a user utterance, but
  manually pass the value in to the relevant API call/resp agent, since passing it
  to the API call agent elsewhere is a little awkward. Similarly, we stick the
  goal as a system utterance so that it is captured in logging. However, we do not
  pass it in manually, since getting the user utterance will be the first turn of
  `parley()`.
docstr_tok: ["Preempt","with","goal","and","schema-based","intent","schemas",".","As","a","logging","hack",",","we","stick","the","schema","gronding","in","as","a","user","utterance",",","but","manually","pass","the","value","in","to","the","relevant","API","call\/resp","agent",",","since","passing","it","to","the","API","call","agent","elsewhere","is","a","little","awkward",".","Similarly",",","we","stick","the","goal","as","a","system","utterance","so","that","it","is","captured","in","logging",".","However",",","we","do","not","pass","it","in","manually",",","since","getting","the","user","utterance","will","be","the","first","turn","of","`","parley","(",")","`","."]
code: def grounding(self):
      """
      Preempt with goal and schema-based intent schemas.
  
      As a logging hack, we stick the schema gronding in as a user utterance, but
      manually pass the value in to the relevant API call/resp agent, since passing it
      to the API call agent elsewhere is a little awkward. Similarly, we stick the
      goal as a system utterance so that it is captured in logging. However, we do not
      pass it in manually, since getting the user utterance will be the first turn of
      `parley()`.
      """
      self._observe_and_act(
          SYSTEM_UTT_IDX,  # Doesn't matter, empty at this point
          USER_UTT_IDX,  # Hack in to a place that'll look nice when printing
          f"getting API schema grounding. (Must start with `{tod.STANDARD_API_SCHEMAS}`)",
          API_SCHEMA_GROUNDING_IDX,
      )
  
      self._observe_and_act(
          USER_UTT_IDX,
          API_CALL_IDX,
          "responding to api schema grounding (empty enter is usually fine) ",
      )
      self._observe_and_act(
          USER_UTT_IDX,
          API_RESP_IDX,
          "responding to api schema grounding (empty enter is usually fine)",
      )
  
      self._observe_and_act(
          SYSTEM_UTT_IDX,  # Doesn't matter for the most part, but want something empty
          SYSTEM_UTT_IDX,  # Hack into a place per comment above
          f"getting goal grounding. (Must start with `{tod.STANDARD_GOAL}`)",
          GOAL_GROUNDING_IDX,
      )
      self.batch_goals = [
          act[SYSTEM_UTT_IDX] for act in self.batch_acts
      ]
      self.turns = 0
  
imports: from parlai.core.metrics import Metric, LegacyMetric
  from parlai.core.message import Message
  from parlai.core.opt import Opt
  from parlai.core.worlds import World
  from parlai.agents.local_human.local_human import LocalHumanAgent
  from parlai.utils.misc import display_messages
  import parlai.core.tod.tod_core
  import parlai.core.tod.world_metrics
  import sys
  import copy
label_desc: Use image node_id 2 for calling the TodWorld obj's underlying member method code with example usage: obj.grounding() without return types