code: def __init__(
      self,
      encoder_output,
      encoder_mask,
      past_key_values,
      src_tokens,
      first,
      src_embed_outputs,
      preseqlen,
  ):
      self.encoder_output = encoder_output
      self.encoder_mask = encoder_mask
      self.past_key_values = past_key_values
      self.src_tokens = src_tokens
      self.first = first
      self.src_embed_outputs = src_embed_outputs
      self.preseqlen = preseqlen
  
imports: import torch
  from torch import nn
  from torch.nn import functional
  from transformers.models.bart.configuration_bart import BartConfig
  from .modeling_bart import BartModel
  from ..utils.util import avg_token_embeddings, seq_to_mask, get_model_device
  from functools import partial
  from typing import Union
label_desc: Use image node_id 1 to create a new PromptBartState object from inherited base classes: object with example: obj = PromptBartState(encoder_output, encoder_mask, past_key_values, src_tokens, first, src_embed_outputs, preseqlen)