code: def add_eos(self, src_tokens, src_lengths):
      bsz, max_seq_len, fdim = src_tokens.size()
      if self.eos_num > 0:
          src_token_eos = torch.zeros(
              [bsz, max_seq_len + self.eos_num, fdim],
              dtype=src_tokens.dtype,
              device=src_tokens.device,
          )
          src_token_eos[:, :max_seq_len] = src_tokens
          for bi in range(bsz):
              src_token_eos[bi][
                  src_lengths[bi] : src_lengths[bi] + self.eos_num
              ] = self.eos_emb.expand(self.eos_num, fdim)
          src_lengths = src_lengths + self.eos_num
          src_tokens = src_token_eos
      return src_tokens, src_lengths
  
imports: import logging
  from collections import namedtuple
  import torch
  import torch.nn
  from fairseq import checkpoint_utils
  from fairseq import utils
  from fairseq.models import FairseqEncoder, FairseqDecoder, FairseqEncoderDecoderModel, register_model, register_model_architecture
  from fairseq.models.fairseq_encoder import EncoderOut
  from fairseq.models.speech_to_text import TransformerDecoder, S2TTransformerEncoder
  from fairseq.models.transformer import TransformerEncoder
  from fairseq.modules import TransformerEncoderLayer, GradMultiply, LayerNorm
label_desc: Use image node_id 3 for calling the SpeechEoSEncoder obj's underlying member method code with example usage: obj.add_eos(src_tokens, src_lengths) and returns: src_tokens,  src_lengths