docstr: Use this if you want to use pretrained embedding. See description
  of IntersectedVocab to get a list of the embedding available from
  torchtext
  
  Parameters
  ----------
  embedding_name : str
      Name of the pretrained alias for the embedding to used
docstr_tok: ["Use","this","if","you","want","to","use","pretrained","embedding",".","See","description","of","IntersectedVocab","to","get","a","list","of","the","embedding","available","from","torchtext","Parameters","--","--","--","--","--","embedding_name",":","str","Name","of","the","pretrained","alias","for","the","embedding","to","used"]
code: def __init__(self, embedding_name, *args, **kwargs):
      """Use this if you want to use pretrained embedding. See description
      of IntersectedVocab to get a list of the embedding available from
      torchtext
  
      Parameters
      ----------
      embedding_name : str
          Name of the pretrained alias for the embedding to used
      """
      self.type = "pretrained"
  
      if embedding_name not in vocab.pretrained_aliases:
          raise RuntimeError(
              f"Unknown embedding type: {embedding_name}"
          )
  
      vector_cache = get_mmf_cache_dir()
  
      # First test loading the vectors in master so that everybody doesn't
      # download it in case it doesn't exist
      if is_main():
          vocab.pretrained_aliases[embedding_name](cache=vector_cache)
      synchronize()
  
      embedding = vocab.pretrained_aliases[embedding_name](
          cache=vector_cache
      )
  
      self.UNK_INDEX = 3
      self.stoi = defaultdict(lambda: self.UNK_INDEX)
      self.itos = {}
  
      self.itos[self.PAD_INDEX] = self.PAD_TOKEN
      self.itos[self.SOS_INDEX] = self.SOS_TOKEN
      self.itos[self.EOS_INDEX] = self.EOS_TOKEN
      self.itos[self.UNK_INDEX] = self.UNK_TOKEN
  
      self.stoi[self.SOS_TOKEN] = self.SOS_INDEX
      self.stoi[self.EOS_TOKEN] = self.EOS_INDEX
      self.stoi[self.PAD_TOKEN] = self.PAD_INDEX
      self.stoi[self.UNK_TOKEN] = self.UNK_INDEX
  
      self.vectors = torch.FloatTensor(
          len(self.itos.keys()) + len(embedding.itos),
          len(embedding.vectors[0]),
      )
  
      for i in range(4):
          self.vectors[i] = torch.ones_like(self.vectors[i]) * 0.1 * i
  
      index = 4
      for word in embedding.stoi:
          self.itos[index] = word
          self.stoi[word] = index
          actual_index = embedding.stoi[word]
          self.vectors[index] = embedding.vectors[actual_index]
          index += 1
  
imports: import logging
  import os
  from collections import defaultdict
  import numpy
  import torch
  from mmf.utils.configuration import get_mmf_cache_dir
  from mmf.utils.distributed import is_main, synchronize
  from mmf.utils.file_io import PathManager
  from mmf.utils.general import get_absolute_path
  from torchtext import vocab
label_desc: Use image node_id 1 to create a new PretrainedVocab object from inherited base classes: BaseVocab with example: obj = PretrainedVocab(embedding_name)