code: def __init__(self, vocab, config):
      super().__init__(vocab)
      self._decode_size = config["inference"]["params"]["beam_length"]
  
imports: import os
  import re
  from collections import Counter
  from itertools import chain
  import torch
  from mmf.common.registry import registry
  from mmf.utils.file_io import PathManager
  from mmf.utils.general import get_absolute_path
label_desc: Use image node_id 1 to create a new BeamSearch object from inherited base classes: TextDecoder with example: obj = BeamSearch(vocab, config)