code: def __init__(self, model):
      super().__init__(model)
      self.beam_scorer = BeamSearchScorerTS()
      self.device = model.device
  
imports: import copy
  import itertools
  from typing import List, Optional, Tuple
  import torch
  import torch.nn.functional
  from transformers import BartConfig
  from transformers.generation import GenerationMixin
label_desc: Use image node_id 1 to create a new BARTBeamSearchGenerator object from inherited base classes: BARTGenerator with example: obj = BARTBeamSearchGenerator(model)