code: def prepare_ext_vocab(self, batch_graph, src_vocab):
      oov_dict = copy.deepcopy(src_vocab)
      token_matrix = []
      for n in batch_graph.node_attributes:
          node_token = n["token"]
          if (
              n.get("type") is None or n.get("type") == 0
          ) and oov_dict.get_symbol_idx(
              node_token
          ) == oov_dict.get_symbol_idx(
              oov_dict.unk_token
          ):
              oov_dict.add_symbol(node_token)
          token_matrix.append(oov_dict.get_symbol_idx(node_token))
      batch_graph.node_features["token_id_oov"] = torch.tensor(
          token_matrix, dtype=torch.long
      ).to(self.device)
      return oov_dict
  
imports: import copy
  import random
  import time
  import warnings
  import numpy
  import torch
  import torch.optim
  from torch.utils.data import DataLoader
  from tqdm import tqdm
  from graph4nlp.pytorch.datasets.mathqa import MathQADatasetForTree
  from graph4nlp.pytorch.models.graph2tree import Graph2Tree
  from graph4nlp.pytorch.modules.utils.tree_utils import Tree
label_desc: Use image node_id 5 for calling the MathQA obj's underlying member method code with example usage: obj.prepare_ext_vocab(batch_graph, src_vocab) and returns: oov_dict