code: def create_rename_keys(state_dict):
      rename_keys = []
      for k in state_dict.keys():
          k_new = k
          if ".pwconv" in k:
              k_new = k_new.replace(".pwconv", ".point_wise_conv")
          if ".dwconv" in k:
              k_new = k_new.replace(".dwconv", ".depth_wise_conv")
          if ".Proj." in k:
              k_new = k_new.replace(".Proj.", ".proj.")
          if "patch_embed" in k_new:
              k_new = k_new.replace(
                  "patch_embed",
                  "swiftformer.patch_embed.patch_embedding",
              )
          if "network" in k_new:
              ls = k_new.split(".")
              if ls[2].isdigit():
                  k_new = (
                      "swiftformer.encoder.network."
                      + ls[1]
                      + ".blocks."
                      + ls[2]
                      + "."
                      + ".".join(ls[3:])
                  )
              else:
                  k_new = k_new.replace(
                      "network", "swiftformer.encoder.network"
                  )
          rename_keys.append((k, k_new))
      return rename_keys
  
file_path: transformers/src/transformers/models/swiftformer/convert_swiftformer_original_to_hf.py
imports: import argparse
  import json
  from pathlib import Path
  import requests
  import torch
  from huggingface_hub import hf_hub_download
  from PIL import Image
  from transformers import SwiftFormerConfig, SwiftFormerForImageClassification, ViTImageProcessor
  from transformers.utils import logging
label_desc: Use image node_id 4 for calling a global function with example usage: create_rename_keys(state_dict) and returns: rename_keys