code: def get_name_map(tf_names, num_stacked_ffn):
      """
      Get the converting mapping between tensor names and mxnet names.
      The above mapping CONVERT_MAP is effectively adaptive to Bert and Albert,
      but there is no guarantee that it can match to other tf models in case of
      some sepecial variable_scope (tensorflow) and prefix (mxnet).
  
      Redefined mapping is encouraged to adapt the personalization model.
  
      Parameters
      ----------
      tf_names
          the parameters names of tensorflow model
      Returns
      -------
      A dictionary with the following format:
          {tf_names : mx_names}
      """
      name_map = {}
      for source_name in tf_names:
          target_name = source_name
          ffn_idx = re.findall(r"ffn_layer_\d+", target_name)
          if ffn_idx:
              target_name = target_name.replace(
                  ffn_idx[0], "ffn_layers_xxx"
              )
          for old, new in CONVERT_MAP:
              target_name = target_name.replace(old, new)
          if ffn_idx:
              target_name = target_name.replace(
                  "stacked_ffn.xxx", "stacked_ffn." + ffn_idx[0][10:]
              )
          if "stacked_ffn.xxy" in target_name:
              target_name = target_name.replace(
                  "stacked_ffn.xxy",
                  "stacked_ffn." + str(num_stacked_ffn - 1),
              )
          name_map[source_name] = target_name
  
      return name_map
  
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 5 for calling a global function with example usage: get_name_map(tf_names, num_stacked_ffn) and returns: name_map