code: def convert_config(tf_cfg, vocab_size):
      print("converting config")
      cfg = GPT2Model.get_cfg().clone()
      cfg.defrost()
      cfg.MODEL.vocab_size = tf_cfg["n_vocab"]
      cfg.MODEL.units = tf_cfg["n_embd"]
      cfg.MODEL.max_length = tf_cfg["n_ctx"]
      cfg.MODEL.num_heads = tf_cfg["n_head"]
      cfg.MODEL.num_layers = tf_cfg["n_layer"]
      cfg.VERSION = 1
      cfg.freeze()
      return cfg
  
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 3 for calling a global function with example usage: convert_config(tf_cfg, vocab_size) and returns: cfg