code: def build_main_parameters(
      pos_wise_act_type: str = "swish",
      conv_mod_act_type: str = "swish",
      pos_enc_dropout_rate: float = 0.0,
      pos_enc_max_len: int = 5000,
      simplified_att_score: bool = False,
      norm_type: str = "layer_norm",
      conv_mod_norm_type: str = "layer_norm",
      after_norm_eps: Optional[float] = None,
      after_norm_partial: Optional[float] = None,
      blockdrop_rate: float = 0.0,
      dynamic_chunk_training: bool = False,
      short_chunk_threshold: float = 0.75,
      short_chunk_size: int = 25,
      num_left_chunks: int = 0,
      **activation_parameters,
  ) -> Dict[str, Any]:
      """Build encoder main parameters.
  
      Args:
          pos_wise_act_type: X-former position-wise feed-forward activation type.
          conv_mod_act_type: X-former convolution module activation type.
          pos_enc_dropout_rate: Positional encoding dropout rate.
          pos_enc_max_len: Positional encoding maximum length.
          simplified_att_score: Whether to use simplified attention score computation.
          norm_type: X-former normalization module type.
          conv_mod_norm_type: Conformer convolution module normalization type.
          after_norm_eps: Epsilon value for the final normalization.
          after_norm_partial: Value for the final normalization with RMSNorm.
          blockdrop_rate: Probability threshold of dropping out each encoder block.
          dynamic_chunk_training: Whether to use dynamic chunk training.
          short_chunk_threshold: Threshold for dynamic chunk selection.
          short_chunk_size: Minimum number of frames during dynamic chunk training.
          num_left_chunks: Number of left chunks the attention module can see.
                           (null or negative value means full context)
          **activation_parameters: Parameters of the activation functions.
                                   (See espnet2/asr_transducer/activation.py)
  
      Returns:
          : Main encoder parameters
  
      """
      main_params = {}
  
      main_params["pos_wise_act"] = get_activation(
          pos_wise_act_type, **activation_parameters
      )
  
      main_params["conv_mod_act"] = get_activation(
          conv_mod_act_type, **activation_parameters
      )
  
      main_params["pos_enc_dropout_rate"] = pos_enc_dropout_rate
      main_params["pos_enc_max_len"] = pos_enc_max_len
  
      main_params["simplified_att_score"] = simplified_att_score
  
      main_params["norm_type"] = norm_type
      main_params["conv_mod_norm_type"] = conv_mod_norm_type
  
      (
          main_params["after_norm_class"],
          main_params["after_norm_args"],
      ) = get_normalization(
          norm_type, eps=after_norm_eps, partial=after_norm_partial
      )
  
      main_params["blockdrop_rate"] = blockdrop_rate
  
      main_params["dynamic_chunk_training"] = dynamic_chunk_training
      main_params["short_chunk_threshold"] = max(
          0, short_chunk_threshold
      )
      main_params["short_chunk_size"] = max(0, short_chunk_size)
      main_params["num_left_chunks"] = max(0, num_left_chunks)
  
      return main_params
  
imports: from typing import Any, Dict, List, Optional, Union
  from espnet2.asr_transducer.activation import get_activation
  from espnet2.asr_transducer.encoder.blocks.branchformer import Branchformer
  from espnet2.asr_transducer.encoder.blocks.conformer import Conformer
  from espnet2.asr_transducer.encoder.blocks.conv1d import Conv1d
  from espnet2.asr_transducer.encoder.blocks.conv_input import ConvInput
  from espnet2.asr_transducer.encoder.blocks.ebranchformer import EBranchformer
  from espnet2.asr_transducer.encoder.modules.attention import RelPositionMultiHeadedAttention
  from espnet2.asr_transducer.encoder.modules.convolution import ConformerConvolution, ConvolutionalSpatialGatingUnit, DepthwiseConvolution
  from espnet2.asr_transducer.encoder.modules.multi_blocks import MultiBlocks
  from espnet2.asr_transducer.encoder.modules.positional_encoding import RelPositionalEncoding
  from espnet2.asr_transducer.normalization import get_normalization
  from espnet.nets.pytorch_backend.transformer.positionwise_feed_forward import PositionwiseFeedForward
label_desc: Use image node_id 1 for calling a global function with example usage: build_main_parameters(pos_wise_act_type, conv_mod_act_type, pos_enc_dropout_rate, pos_enc_max_len, simplified_att_score, norm_type, conv_mod_norm_type, after_norm_eps, after_norm_partial, blockdrop_rate, dynamic_chunk_training, short_chunk_threshold, short_chunk_size, num_left_chunks) and returns: main_params