code: def wordid2str(word_ids, vocab):
      ret = []
      assert len(word_ids.shape) == 2, print(word_ids.shape)
      for i in range(word_ids.shape[0]):
          id_list = word_ids[i, :]
          ret_inst = []
          for j in range(id_list.shape[0]):
              if id_list[j] == vocab.EOS or id_list[j] == vocab.PAD:
                  break
              token = vocab.getWord(id_list[j])
              ret_inst.append(token)
          ret.append(" ".join(ret_inst))
      return ret
  
imports: import argparse
  import multiprocessing
  import os
  import platform
  import time
  import numpy
  import torch
  import torch.backends.cudnn
  import torch.multiprocessing
  import torch.nn
  import torch.optim
  from torch.optim.lr_scheduler import ReduceLROnPlateau
  from torch.utils.data import DataLoader
  from graph4nlp.pytorch.datasets.squad import SQuADDataset
  from graph4nlp.pytorch.models.graph2seq import Graph2Seq
  from graph4nlp.pytorch.models.graph2seq_loss import Graph2SeqLoss
  from graph4nlp.pytorch.modules.config import get_basic_args
  from graph4nlp.pytorch.modules.evaluation import BLEU, METEOR, ROUGE
  from graph4nlp.pytorch.modules.graph_embedding_initialization.embedding_construction import WordEmbedding
  from graph4nlp.pytorch.modules.utils import constants
  from graph4nlp.pytorch.modules.utils.config_utils import get_yaml_config, update_values
  from graph4nlp.pytorch.modules.utils.copy_utils import prepare_ext_vocab
  from graph4nlp.pytorch.modules.utils.generic_utils import EarlyStopping, grid, to_cuda
  from graph4nlp.pytorch.modules.utils.logger import Logger
  from .fused_embedding_construction import FusedEmbeddingConstruction
label_desc: Use image node_id 2 for calling a global function with example usage: wordid2str(word_ids, vocab) and returns: ret