code: def convert_tf2_checkpoint_to_pytorch(
      tf_checkpoint_path, config_path, pytorch_dump_path
  ):
      # Instantiate model
      logger.info(
          f"Loading model based on config from {config_path}..."
      )
      config = BertConfig.from_json_file(config_path)
      model = BertModel(config)
  
      # Load weights from checkpoint
      logger.info(
          f"Loading weights from checkpoint {tf_checkpoint_path}..."
      )
      load_tf2_weights_in_bert(model, tf_checkpoint_path, config)
  
      # Save pytorch-model
      logger.info(f"Saving PyTorch model to {pytorch_dump_path}...")
      torch.save(model.state_dict(), pytorch_dump_path)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/bert/convert_bert_original_tf2_checkpoint_to_pytorch.py
imports: import argparse
  import os
  import re
  import tensorflow
  import torch
  from transformers import BertConfig, BertModel
  from transformers.utils import logging
label_desc: Use image node_id 2 for calling a global function with example usage: convert_tf2_checkpoint_to_pytorch(tf_checkpoint_path, config_path, pytorch_dump_path) without return types