code: def inject_ls_layer(model, config):
      bert_emb_config = gen_bert_emb_config(config)
      model.bert.embeddings = BertEmbeddingLayer(bert_emb_config)
      model.bert.embeddings.apply(qat_mode)
  
      for i in range(config.num_hidden_layers):
          bert_enc_config = gen_bert_enc_config(config)
          model.bert.encoder.layer[i] = LSHFTransformerEncoderLayer(
              bert_enc_config
          ).cuda()
          model.bert.encoder.layer[i].apply(qat_mode)
  
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 8 for calling a global function with example usage: inject_ls_layer(model, config) without return types