code: def build_encoder(cls, args):
      encoder = S2TConformerEncoder(args)
      pretraining_path = getattr(
          args, "load_pretrained_encoder_from", None
      )
      if pretraining_path is not None:
          if not Path(pretraining_path).exists():
              logger.warning(
                  f"skipped pretraining because {pretraining_path} does not exist"
              )
          else:
              encoder = (
                  checkpoint_utils.load_pretrained_component_from_model(
                      component=encoder, checkpoint=pretraining_path
                  )
              )
              logger.info(
                  f"loaded pretrained encoder from: {pretraining_path}"
              )
      return encoder
  
imports: import logging
  import math
  from pathlib import Path
  import torch
  from fairseq import checkpoint_utils
  from fairseq.data.data_utils import lengths_to_padding_mask
  from fairseq.models import FairseqEncoder, register_model, register_model_architecture
  from fairseq.models.speech_to_text.modules.convolution import Conv1dSubsampler, Conv2dSubsampler
  from fairseq.models.speech_to_text.s2t_transformer import S2TTransformerEncoder, S2TTransformerModel
  from fairseq.models.speech_to_text.s2t_transformer import base_architecture
  from fairseq.modules import PositionalEmbedding, RelPositionalEncoding
  from fairseq.modules.conformer_layer import ConformerEncoderLayer
label_desc: Use image node_id 3 for calling the S2TConformerModel obj's underlying member method code with example usage: obj.build_encoder(cls, args) and returns: encoder