code: def __init__(self, encoder, decoder, pretrained_encoder=None):
      super().__init__(encoder, decoder)
      self.encoder.num_attention_layers = sum(
          layer is not None for layer in decoder.attention
      )
      self.pretrained_encoder = pretrained_encoder
      if self.pretrained_encoder is None:
          encoders = {"encoder": encoder}
      else:
          encoders = {
              "encoder": encoder,
              "pretrained": self.pretrained_encoder,
          }
      # for fusion model, CompositeEncoder contains both pretrained and training encoders
      # these are forwarded and then combined in the decoder
      self.encoder = CompositeEncoder(encoders)
  
imports: import logging
  import math
  import os
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import checkpoint_utils
  from fairseq.incremental_decoding_utils import with_incremental_state
  from fairseq.models import CompositeEncoder, FairseqDecoder, FairseqEncoder, FairseqEncoderDecoderModel, register_model, register_model_architecture
  from fairseq.modules import DownsampledMultiHeadAttention, FairseqDropout, GradMultiply, LayerNorm, LearnedPositionalEmbedding, LinearizedConvolution
label_desc: Use image node_id 2 to create a new FConvModelSelfAtt object from inherited base classes: FairseqEncoderDecoderModel with example: obj = FConvModelSelfAtt(encoder, decoder, pretrained_encoder)