code: def forward(
      self, src_tokens, attention_mask=None, past_key_values=None
  ):
      encoder_dicts = self.bart_encoder(
          input_ids=src_tokens,
          attention_mask=attention_mask,
          return_dict=True,
          output_hidden_states=True,
          past_prompt=past_key_values,
      )
      return (
          encoder_dicts.last_hidden_state,
          encoder_dicts.hidden_states,
      )
  
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 2 for calling the PromptBartEncoder obj's underlying member method code with example usage: obj.forward(src_tokens, attention_mask, past_key_values) and returns: encoder_dicts,  encoder_dicts