class_docstr: analogous to fairseq.data.IndexedCachedDataset
docstr: Get tensor of token indices for example i
docstr_tok: ["Get","tensor","of","token","indices","for","example","i"]
code: def get_tokens(self, i):
      """Get tensor of token indices for example i"""
      assert i < self.__len__(), f"index {i} out of range!"
      a = self.word_buffer[
          self.word_offsets[i] : self.word_offsets[i + 1]
      ]
      return torch.from_numpy(a)
  
imports: from typing import Any, Dict
  import numpy
  import torch
  from fairseq import data, tokenizer
  from fvcore.common.file_io import PathManager
  from pytorch_translate import vocab_constants
  from pytorch_translate.data.dictionary import TAGS
label_desc: Use image node_id 2 for calling the InMemoryNumpyWordCharDataset obj's underlying member method code with example usage: obj.get_tokens(i) and returns: torch