class_docstr: Base class for all other agents.
class_docstr_tok: ["Base","class","for","all","other","agents","."]
docstr: An agent convenience function which calls the batch_act() and provides a batch
  response to a list of messages.
  
  :param List[Message] messages:
      A list of messages each of which MUST comprise of the 'text' field
      apart from other fields.
  :return:
      Agent's batch response to the messages.
  :rtype:
      List[str]
docstr_tok: ["An","agent","convenience","function","which","calls","the","batch_act","(",")","and","provides","a","batch","response","to","a","list","of","messages",".",":","param","List","[","Message","]","messages",":","A","list","of","messages","each","of","which","MUST","comprise","of","the","'text","'","field","apart","from","other","fields",".",":","return",":","Agent","'s","batch","response","to","the","messages",".",":","rtype",":","List","[","str","]"]
code: def batch_respond(self, messages: List[Message]) -> List[str]:
      """
      An agent convenience function which calls the batch_act() and provides a batch
      response to a list of messages.
  
      :param List[Message] messages:
          A list of messages each of which MUST comprise of the 'text' field
          apart from other fields.
      :return:
          Agent's batch response to the messages.
      :rtype:
          List[str]
      """
      observations = []
      agents = []
      for i, message in enumerate(messages):
          if "text" not in message:
              raise RuntimeError(
                  "The agent needs a 'text' field in the {}th message.".format(
                      i
                  )
              )
          if "episode_done" not in message:
              message["episode_done"] = True
          agent = self.clone()
          agents.append(agent)
          observations.append(agent.observe(message))
      agent_acts = self.batch_act(observations)
      response = []
      for agent, resp in zip(agents, agent_acts):
          if hasattr(agent, "self_observe"):
              agent.self_observe(resp)
          response.append(resp["text"])
      return response
  
imports: import copy
  from typing import List, Union
  from parlai.core.build_data import modelzoo_path
  from parlai.core.loader import load_agent_module
  from parlai.core.loader import register_agent
  from parlai.core.message import Message
  from parlai.core.opt import Opt
  from parlai.utils.misc import warn_once
  import parlai.utils.logging
  from parlai.utils.io import PathManager
label_desc: Use image node_id 13 for calling the Agent obj's underlying member method code with example usage: obj.batch_respond(messages) and returns: response