code: def replace_params(hf_params, tf_params, key_mapping):
      list(hf_params.keys())
  
      for key, value in tf_params.items():
          if key not in key_mapping:
              continue
  
          hf_key = key_mapping[key]
          if "_conv" in key and "kernel" in key:
              new_hf_value = torch.from_numpy(value).permute(3, 2, 0, 1)
          elif "embeddings" in key:
              new_hf_value = torch.from_numpy(value)
          elif "depthwise_kernel" in key:
              new_hf_value = torch.from_numpy(value).permute(2, 3, 0, 1)
          elif "kernel" in key:
              new_hf_value = torch.from_numpy(np.transpose(value))
          elif "temperature" in key:
              new_hf_value = value
          elif "bn/gamma" or "bn/beta" in key:
              new_hf_value = torch.from_numpy(
                  np.transpose(value)
              ).squeeze()
          else:
              new_hf_value = torch.from_numpy(value)
  
          # Replace HF parameters with original TF model parameters
          hf_params[hf_key].copy_(new_hf_value)
  
file_path: transformers/src/transformers/models/align/convert_align_tf_to_hf.py
imports: import argparse
  import os
  import align
  import numpy
  import requests
  import tensorflow
  import torch
  from PIL import Image
  from tokenizer import Tokenizer
  from transformers import AlignConfig, AlignModel, AlignProcessor, BertConfig, BertTokenizer, EfficientNetConfig, EfficientNetImageProcessor
  from transformers.utils import logging
label_desc: Use image node_id 6 for calling a global function with example usage: replace_params(hf_params, tf_params, key_mapping) without return types