code: def test_id2doc(self):
      # word ids.
      docs = [["B-PSN"], ["B-ORG", "I-ORG"], ["B-LOC", "I-LOC", "O"]]
      vocab = Vocabulary(unk_token=False, lower=False)
      vocab.add_documents(docs)
      vocab.build()
      true_doc = ["O", "B-LOC", "O", "O"]
      doc_ids = vocab.doc2id(true_doc)
      pred_doc = vocab.id2doc(doc_ids)
      self.assertEqual(pred_doc, true_doc)
  
file_path: anago/tests/test_utils.py
imports: import os
  import unittest
  from anago.utils import load_data_and_labels, Vocabulary, download, NERSequence
  from anago.preprocessing import IndexTransformer
label_desc: Use image node_id 3 for calling the TestVocabulary obj's underlying member method code with example usage: obj.test_id2doc() without return types