class_docstr: ImageSeq2seqAgent Agent.
  
  Combines a transformer generator with images.
class_docstr_tok: ["ImageSeq2seqAgent","Agent",".","Combines","a","transformer","generator","with","images","."]
docstr: Override to include image token.
docstr_tok: ["Override","to","include","image","token","."]
code: def _set_text_vec(self, *args, **kwargs) -> dict:
      """
      Override to include image token.
      """
      obs = super()._set_text_vec(*args, **kwargs)
      if "text" not in obs or "text_vec" not in obs:
          return obs
      if self.opt.get("include_image_token", False):
          # `truncate` is the third arg to this function
          truncate = args[2] - 1 if args[2] is not None else None
          vec = torch.LongTensor(  # type: ignore
              self._check_truncate(obs["text_vec"], truncate, True)
          )
          token = TOKEN_NO_IMAGE
          if obs.get("image", None) is not None:
              token = TOKEN_IMAGE
          obs.force_set(
              "text_vec",
              torch.cat(
                  [vec, vec.new_tensor(self.dict[token]).unsqueeze(0)],
                  0,
              ),
          )
      return obs
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from typing import Dict, List, Tuple
  import torch
  from .modules import ImageSeq2seqModel, FusionType
  from parlai.agents.transformer.transformer import TransformerGeneratorAgent
  from parlai.core.dict import DictionaryAgent
  from parlai.core.torch_agent import Batch
  from parlai.core.torch_image_agent import TorchImageAgent
label_desc: Use image node_id 4 for calling the ImageSeq2seqAgent obj's underlying member method code with example usage: obj._set_text_vec() and returns: obs, obs