class_docstr: Mixin for agents used within BB2.
  
  agents: list of agents
  agent_dict: dictionary for the agent
  input_type: for logging purposes.
class_docstr_tok: ["Mixin","for","agents","used","within","BB2",".","agents",":","list","of","agents","agent_dict",":","dictionary","for","the","agent","input_type",":","for","logging","purposes","."]
docstr: Batch generate items from an input list of texts.
  
  :param texts:
      list of texts
  
  :return generations:
      return agent generations for each input.
docstr_tok: ["Batch","generate","items","from","an","input","list","of","texts",".",":","param","texts",":","list","of","texts",":","return","generations",":","return","agent","generations","for","each","input","."]
code: def _batch_generate(self, texts: List[str]) -> List[str]:
      """
      Batch generate items from an input list of texts.
  
      :param texts:
          list of texts
  
      :return generations:
          return agent generations for each input.
      """
      start = time.time()
      active_agents = self.agents[: len(texts)]
      for agent_i, t_i in zip(active_agents, texts):
          agent_i.observe(Message({"text": t_i, "episode_done": True}))
      agent_replies = self.agents[0].batch_act(
          [a.observation for a in active_agents]
      )
      logging.debug(f"Generated: {time.time() - start:.2f}")
      for agent_i, reply_i in zip(active_agents, agent_replies):
          agent_i.self_observe(reply_i)
      self.generations = [r.get("text", "dummy") for r in agent_replies]
      return self.generations
  
imports: from enum import Enum, auto
  import os
  import string
  import time
  import torch
  import torch.nn
  from typing import List, Tuple, Dict, Optional, Any
  from parlai.agents.rag.retrievers import clean_vec
  from parlai.core.agents import create_agent_from_model_file, create_agent_from_shared
  from parlai.core.build_data import modelzoo_path
  from parlai.core.dict import DictionaryAgent
  from parlai.core.message import Message
  from parlai.core.opt import Opt
  from parlai.core.torch_agent import TorchAgent
  from parlai.tasks.msc.agents import NOPERSONA
  import parlai.utils.logging
label_desc: Use image node_id 3 for calling the BB2SubmoduleMixin obj's underlying member method code with example usage: obj._batch_generate(texts) and returns: self