code: def _decoder_forward(
      self,
      input_ids,
      encoder_output,
      attention_mask,
      past: List[torch.Tensor],
  ):
      # Update here to use different decoder for different values of past.
      if past is None or len(past) == 0:
          decoder_output, past = self.decoder_no_past(
              input_ids=input_ids,
              encoder_state=encoder_output,
              attention_mask=attention_mask,
          )
      else:
          decoder_output, past = self.decoder_with_past(
              input_ids=input_ids,
              encoder_state=encoder_output,
              attention_mask=attention_mask,
              past=past,
          )
  
      lm_logits = F.linear(
          decoder_output,
          self.final_logits_weight,
          bias=self.final_logits_bias,
      )
  
      return lm_logits, past
  
imports: import copy
  import itertools
  from typing import List, Optional, Tuple
  import torch
  import torch.nn.functional
  from transformers import BartConfig
  from transformers.generation_utils import GenerationMixin
label_desc: Use image node_id 5 for calling the BARTGenerator obj's underlying member method code with example usage: obj._decoder_forward(input_ids, encoder_output, attention_mask, past) and returns: lm_logits,  past