code: def fill_pb_layer(tensor_names, state_dict, layer, mapping_dict):
      for proto_name, ckpt_rule in mapping_dict.items():
          target_tensor = apply_rule(
              proto_name, ckpt_rule, tensor_names, state_dict
          )
          exec(
              "layer.%s[:]=target_tensor.flatten().tolist()"
              % proto_name
          )
  
file_path: lightseq/lightseq/training/ops/pytorch/export.py
imports: from collections import OrderedDict
  import numpy
  from lightseq.training.ops.pytorch.util import get_pos_embedding
  from lightseq.training import LSTransformerEncoderLayer, LSTransformerDecoderLayer
label_desc: Use image node_id 3 for calling a global function with example usage: fill_pb_layer(tensor_names, state_dict, layer, mapping_dict) without return types