code: def _extract_weight(state_dict):
      encoder_state_dict = {}
      decoder_state_dict = {}
      for k in state_dict:
          if k.startswith("encoder."):
              encoder_state_dict[k] = state_dict[k]
          if k.startswith("decoder."):
              decoder_state_dict[k] = state_dict[k]
      return encoder_state_dict, decoder_state_dict
  
file_path: lightseq/examples/inference/python/export/ls_quant_transformer_export.py
imports: import argparse
  import time
  import numpy
  import torch
  from transformers import BertTokenizer
  from proto.quant_transformer_pb2 import QuantTransformer
  from lightseq.training import export_ls_config, export_ls_quant_embedding, export_ls_quant_encoder, export_ls_quant_decoder, LSTransformer
  import lightseq.inference
label_desc: Use image node_id 1 for calling a global function with example usage: _extract_weight(state_dict) and returns: encoder_state_dict,  decoder_state_dict