code: def gen_bert_enc_config(config):
      bert_enc_config = TransformerEncoderLayer.get_config(
          max_batch_tokens=4096,
          max_seq_len=config.max_position_embeddings,
          hidden_size=config.hidden_size,
          intermediate_size=config.intermediate_size,
          nhead=config.num_attention_heads,
          attn_prob_dropout_ratio=config.attention_probs_dropout_prob,
          activation_dropout_ratio=config.hidden_dropout_prob,
          hidden_dropout_ratio=config.hidden_dropout_prob,
          pre_layer_norm=False,
          fp16=True,
          local_rank=0,
          activation_fn="gelu",
      )
      return bert_enc_config
  
imports: import time
  import torch
  from transformers import BertTokenizer, BertForTokenClassification, BertConfig
  import lightseq.inference
  from lightseq.training.ops.pytorch.quantization import qat_mode
  from lightseq.training.ops.pytorch.torch_transformer_layers import BertEmbeddingLayer, TransformerEncoderLayer
  from export.util import parse_args
label_desc: Use image node_id 7 for calling a global function with example usage: gen_bert_enc_config(config) and returns: bert_enc_config