docstr: :param torch.LongTensor src_tokens: bsz x max_len
  :param torch.LongTensor src_seq_len: bsz
  :return:
code: def predict(self, src_tokens, src_seq_len=None, first=None):
      """
      :param torch.LongTensor src_tokens: bsz x max_len
      :param torch.LongTensor src_seq_len: bsz
      :return:
      """
      prompt_state = self.prompt_model.generator(
          src_tokens, src_seq_len, first
      )  # encoder output
      result = self.generate_func(tokens=None, state=prompt_state)
      return result
  
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 3 for calling the PromptGeneratorModel obj's underlying member method code with example usage: obj.predict(src_tokens, src_seq_len, first) and returns: result