code: def _get_encode_output_mapping_dict(dec_layer_num):
      encode_output_kernel_pattern = [
          "encoder_attn {0} k_proj weight&&encoder_attn {0} v_proj weight".format(
              ele
          )
          for ele in range(dec_layer_num)
      ]
      encode_output_bias_pattern = [
          "encoder_attn {0} k_proj bias&&encoder_attn {0} v_proj bias".format(
              ele
          )
          for ele in range(dec_layer_num)
      ]
  
      return {
          "encode_output_project_kernel_kv": "&&".join(
              encode_output_kernel_pattern
              + ["expression_.transpose(0, 1)"]
          ),
          "encode_output_project_bias_kv": "&&".join(
              encode_output_bias_pattern
          ),
      }
  
file_path: lightseq/examples/inference/python/export/fairseq/native_fs_transformer_export.py
imports: from collections import OrderedDict
  import torch
  from export.proto.transformer_pb2 import Transformer
  from lightseq.training.ops.pytorch.export import gather_token_embedding, fill_pb_layer, export_ls_config
  from lightseq.training.ops.pytorch.util import get_pos_embedding
  import lightseq.inference
  from export.util import parse_args, save_model
label_desc: Use image node_id 1 for calling a global function with example usage: _get_encode_output_mapping_dict(dec_layer_num) and returns: dict