code: def convert_ckpt_to_deepspeed(
      model, ckpt_type, ckpt_path, vocab_diff, kernel_enabled
  ):
      # Load weights from checkpoint
      if ckpt_type == "HF":
          if kernel_enabled:
              load_hf_weights_in_bert_kernel(
                  model, ckpt_path, vocab_diff
              )
          else:
              load_hf_weights_in_bert_torch(
                  model, ckpt_path, vocab_diff
              )
      elif ckpt_type == "TF":
          if kernel_enabled:
              load_tf_weights_in_bert_kernel(
                  model, ckpt_path, vocab_diff
              )
          else:
              raise ValueError(
                  "--deepspeed_transformer_kernel is required for loading TF checkpoint."
              )
      else:
          raise ValueError(f"Invalid ckpt_type.")
  
file_path: deepspeedexamples/training/BingBertSquad/convert_bert_ckpt_to_deepspeed.py
imports: import os
  import argparse
  import logging
  import torch
  import re
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: convert_ckpt_to_deepspeed(model, ckpt_type, ckpt_path, vocab_diff, kernel_enabled) without return types