code: def layer_name_mapping(key, file):
      """Convert Megatron-DeepSpeed TP/PP weights mapping in transformers PP only"""
      # Handle first and last layers
      layer_rename_map = {
          "word_embeddings.weight": "word_embeddings.weight",
          "word_embeddings.norm.weight": "word_embeddings_layernorm.weight",
          "word_embeddings.norm.bias": "word_embeddings_layernorm.bias",
          "weight": "ln_f.weight",
          "bias": "ln_f.bias",
      }
  
      if key in layer_rename_map:
          return layer_rename_map[key]
  
      # Handle transformer blocks
      layer_number = int(re.match(r".*layer_(\d*).*", file)[1])
      layer_number -= 3
      return f"h.{layer_number}." + key
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/bloom/convert_bloom_original_checkpoint_to_pytorch.py
imports: import argparse
  import json
  import os
  import re
  import torch
  from transformers import BloomConfig, BloomModel
  from transformers.file_utils import CONFIG_NAME, WEIGHTS_NAME
  from transformers.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: layer_name_mapping(key, file) and returns: unknown, layer_rename_map