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: Clean a tensor before converting to a string.
docstr_tok: ["Clean","a","tensor","before","converting","to","a","string","."]
code: def clean_input(self, vec: torch.LongTensor) -> List[int]:
      """
      Clean a tensor before converting to a string.
      """
      assert self.agent_dict is not None
      return clean_vec_with_dict(self.agent_dict, vec)
  
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 2 for calling the BB2SubmoduleMixin obj's underlying member method code with example usage: obj.clean_input(vec) and returns: clean_vec_with_dict