code: def convert_tf_config(config_dict_path, vocab_size):
      """Convert the config file"""
      with open(config_dict_path, encoding="utf-8") as f:
          config_dict = json.load(f)
      assert vocab_size == config_dict["vocab_size"]
      cfg = MobileBertModel.get_cfg().clone()
      cfg.defrost()
      cfg.MODEL.vocab_size = vocab_size
      cfg.MODEL.units = config_dict["hidden_size"]
      cfg.MODEL.embed_size = config_dict["embedding_size"]
      cfg.MODEL.inner_size = config_dict["intra_bottleneck_size"]
      cfg.MODEL.hidden_size = config_dict["intermediate_size"]
      cfg.MODEL.max_length = config_dict["max_position_embeddings"]
      cfg.MODEL.num_heads = config_dict["num_attention_heads"]
      cfg.MODEL.num_layers = config_dict["num_hidden_layers"]
      cfg.MODEL.bottleneck_strategy
      cfg.MODEL.num_stacked_ffn = config_dict[
          "num_feedforward_networks"
      ]
      cfg.MODEL.pos_embed_type = "learned"
      cfg.MODEL.activation = config_dict["hidden_act"]
      cfg.MODEL.num_token_types = config_dict["type_vocab_size"]
      cfg.MODEL.hidden_dropout_prob = float(
          config_dict["hidden_dropout_prob"]
      )
      cfg.MODEL.attention_dropout_prob = float(
          config_dict["attention_probs_dropout_prob"]
      )
      cfg.MODEL.normalization = config_dict["normalization_type"]
      cfg.MODEL.dtype = "float32"
  
      if "use_bottleneck_attention" in config_dict.keys():
          cfg.MODEL.bottleneck_strategy = "from_bottleneck"
      elif "key_query_shared_bottleneck" in config_dict.keys():
          cfg.MODEL.bottleneck_strategy = "qk_sharing"
      else:
          cfg.MODEL.bottleneck_strategy = "from_input"
  
      cfg.INITIALIZER.weight = [
          "truncnorm",
          0,
          config_dict["initializer_range"],
      ]  # TruncNorm(0, 0.02)
      cfg.INITIALIZER.bias = ["zeros"]
      cfg.VERSION = 1
      cfg.freeze()
      return cfg
  
imports: import os
  import re
  import json
  import sys
  import shutil
  import logging
  import argparse
  import mxnet
  import numpy
  from numpy.testing import assert_allclose
  from gluonnlp.utils.misc import sha1sum, naming_convention, logging_config
  from gluonnlp.data.tokenizers import HuggingFaceWordPieceTokenizer
  from gluonnlp.models.mobilebert import MobileBertModel, MobileBertForPretrain
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling a global function with example usage: convert_tf_config(config_dict_path, vocab_size) and returns: cfg