code: def read_tf_ckpt(path):
      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
  
imports: import os
  import re
  import json
  import shutil
  import logging
  import argparse
  import tensorflow
  from tensorflow.contrib.training import HParams
  from gpt_2.src import model
  import mxnet
  import numpy
  from numpy.testing import assert_allclose
  from gluonnlp.data.vocab import Vocab
  from gluonnlp.utils.misc import sha1sum, logging_config, naming_convention
  from gluonnlp.models.gpt2 import GPT2Model, GPT2ForLM
label_desc: Use image node_id 4 for calling a global function with example usage: read_tf_ckpt(path) and returns: tensors