code: def replace_key_with_offset(key, offset, original_name, new_name):
      """
      Replaces the key by subtracting the offset from the original layer number
      """
      to_find = original_name.split(".")[0]
      key_list = key.split(".")
      orig_block_num = int(key_list[key_list.index(to_find) - 2])
      layer_num = int(key_list[key_list.index(to_find) - 1])
      new_block_num = orig_block_num - offset
  
      key = key.replace(
          f"{orig_block_num}.{layer_num}.{original_name}",
          f"block.{new_block_num}.{layer_num}.{new_name}",
      )
      return key
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/poolformer/convert_poolformer_original_to_pytorch.py
imports: import argparse
  import json
  from collections import OrderedDict
  from pathlib import Path
  import torch
  from PIL import Image
  import requests
  from huggingface_hub import hf_hub_download
  from transformers import PoolFormerConfig, PoolFormerFeatureExtractor, PoolFormerForImageClassification
  from transformers.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: replace_key_with_offset(key, offset, original_name, new_name) and returns: key