class_docstr: Mock Dictionary Agent which just implements indexing and txt2vec.
class_docstr_tok: ["Mock","Dictionary","Agent","which","just","implements","indexing","and","txt2vec","."]
docstr: Return index of special tokens or range from 1 for each token.
docstr_tok: ["Return","index","of","special","tokens","or","range","from","1","for","each","token","."]
code: def txt2vec(self, txt):
      """
      Return index of special tokens or range from 1 for each token.
      """
      self.idx = 0
      return [self[tok] for tok in txt.split()]
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.torch_agent import TorchAgent, Output
  import torch
  from parlai.core.agents import Agent
label_desc: Use image node_id 6 for calling the MockDict obj's underlying member method code with example usage: obj.txt2vec(txt) and returns: unknown