code: def get_new_dict(d, config, rename_keys_prefix=rename_keys_prefix):
      new_d = OrderedDict()
      new_d["visual_bert.embeddings.position_ids"] = torch.arange(
          config.max_position_embeddings
      ).expand((1, -1))
      # detector_d = OrderedDict()
      for key in d:
          if "detector" in key:
              # detector_d[key.replace('detector.','')] = d[key]
              continue
          new_key = key
          for name_pair in rename_keys_prefix:
              new_key = new_key.replace(name_pair[0], name_pair[1])
          new_d[new_key] = d[key]
          if key == "bert.cls.predictions.decoder.weight":
              # Old bert code didn't have `decoder.bias`, but was added separately
              new_d["cls.predictions.decoder.bias"] = new_d[
                  "cls.predictions.bias"
              ]
      return new_d
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/visual_bert/convert_visual_bert_original_pytorch_checkpoint_to_pytorch.py
imports: import argparse
  from collections import OrderedDict
  from pathlib import Path
  import torch
  from transformers import VisualBertConfig, VisualBertForMultipleChoice, VisualBertForPreTraining, VisualBertForQuestionAnswering, VisualBertForVisualReasoning
  from transformers.utils import logging
label_desc: Use image node_id 2 for calling a global function with example usage: get_new_dict(d, config, rename_keys_prefix) and returns: new_d