class_docstr: An architecture combining hybrid Transformer/RNN with character-based
  inputs (token embeddings created via character-input CNN)
code: def build_encoder(cls, args, src_dict):
      # If we embed bytes then the number of indices is fixed and does not
      # depend on the dictionary
      if args.embed_bytes:
          num_chars = (
              vocab_constants.NUM_BYTE_INDICES + TAGS.__len__() + 1
          )
      else:
          num_chars = args.char_source_dict_size
  
      encoder_embed_tokens = (
          pytorch_translate_transformer.build_embedding(
              dictionary=src_dict,
              embed_dim=args.encoder_embed_dim,
              path=args.encoder_pretrained_embed,
              freeze=args.encoder_freeze_embed,
          )
      )
      return CharCNNEncoder(
          args,
          src_dict,
          encoder_embed_tokens,
          num_chars=num_chars,
          embed_dim=args.char_embed_dim,
          char_cnn_params=args.char_cnn_params,
          char_cnn_nonlinear_fn=args.char_cnn_nonlinear_fn,
          char_cnn_num_highway_layers=args.char_cnn_num_highway_layers,
          char_cnn_output_dim=getattr(args, "char_cnn_output_dim", -1),
          use_pretrained_weights=getattr(
              args, "use_pretrained_weights", False
          ),
          finetune_pretrained_weights=getattr(
              args, "finetune_pretrained_weights", False
          ),
          weights_file=getattr(args, "pretrained_weights_file", ""),
      )
  
imports: import logging
  import math
  from ast import literal_eval
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq.models import FairseqEncoder, register_model, register_model_architecture, transformer
  from fairseq.modules import SinusoidalPositionalEmbedding
  from pytorch_translate import char_encoder, char_source_model, hybrid_transformer_rnn, model_constants, rnn, transformer, utils, vocab_constants
  from pytorch_translate.common_layers import TransformerEncoderGivenEmbeddings, VariableTracker
  from pytorch_translate.data.dictionary import TAGS
label_desc: Use image node_id 5 for calling the CharSourceHybridModel obj's underlying member method code with example usage: obj.build_encoder(cls, args, src_dict) and returns: CharCNNEncoder