code: def get_enc_layer_config(training_args, config):
      enc_config = LSHFTransformerEncoderLayer.get_config(
          max_seq_len=config.max_position_embeddings,
          hidden_size=config.d_model,
          intermediate_size=config.encoder_ffn_dim,
          nhead=config.encoder_attention_heads,
          attn_prob_dropout_ratio=config.attention_dropout,
          activation_dropout_ratio=config.activation_dropout,
          hidden_dropout_ratio=config.dropout,
          activation_fn=config.activation_function,
          max_batch_tokens=4096,
          pre_layer_norm=False,
          fp16=training_args.fp16,
          local_rank=training_args.local_rank,
      )
      enc_params_list = LSHFTransformerEncoderLayer.get_params_list(
          self_attn_q_proj="self_attn.q_proj",
          self_attn_k_proj="self_attn.k_proj",
          self_attn_v_proj="self_attn.v_proj",
          self_attn_out_proj="self_attn.out_proj",
          self_attn_layer_norm="self_attn_layer_norm",
          fc1="fc1",
          fc2="fc2",
          final_layer_norm="final_layer_norm",
      )
      return enc_config, enc_params_list
  
imports: import torch
  from torch import nn
  from dataclasses import dataclass
  from lightseq.training.ops.pytorch.transformer_encoder_layer import LSTransformerEncoderLayer
  from lightseq.training.ops.pytorch.transformer_decoder_layer import LSTransformerDecoderLayer
  from lightseq.training.ops.pytorch.quantization import weight_quant_config, act_quant_config, relu_quant_config
  from transformers import BartPretrainedModel, BartForConditionalGeneration, BartForSequenceClassification, BartForQuestionAnswering
  from transformers.models.bart.modeling_bart import BartEncoderLayer, BartDecoderLayer
label_desc: Use image node_id 3 for calling a global function with example usage: get_enc_layer_config(training_args, config) and returns: enc_config,  enc_params_list