code: def read_tf_checkpoint(path):
      """read tensorflow checkpoint"""
      from tensorflow.python import pywrap_tensorflow
  
      tensors = {}
      reader = pywrap_tensorflow.NewCheckpointReader(path)
      var_to_shape_map = reader.get_variable_to_shape_map()
      for key in sorted(var_to_shape_map):
          tensor = reader.get_tensor(key)
          tensors[key] = tensor
      return tensors
  
file_path: gluon-nlp/scripts/conversion_toolkits/convert_electra.py
imports: import os
  import re
  import sys
  import shutil
  import logging
  import argparse
  import mxnet
  import numpy
  from numpy.testing import assert_allclose
  from gluonnlp.utils.misc import naming_convention, logging_config
  from gluonnlp.data.tokenizers import HuggingFaceWordPieceTokenizer
  from gluonnlp.models.electra import ElectraModel, ElectraGenerator, ElectraDiscriminator, ElectraForPretrain, get_generator_cfg
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: read_tf_checkpoint(path) and returns: tensors