code: def get_dict_config(model_size, electra_path):
      sys.path.append(electra_path)
      electra_dir = os.path.abspath(
          os.path.join(os.path.dirname(electra_path), os.path.pardir)
      )
      sys.path.append(electra_dir)
      from electra.util.training_utils import get_bert_config
      from electra.configure_pretraining import PretrainingConfig
  
      config = PretrainingConfig(
          model_name="", data_dir="", model_size=model_size
      )
      bert_config = get_bert_config(config)
      # we are not store all configuration of electra generators but only the scale size.
      config_dict = bert_config.to_dict()
      config_dict.update(
          {
              "embedding_size": config.embedding_size,
              "generator_hidden_size": config.generator_hidden_size,
              "generator_layers": config.generator_layers,
          }
      )
      return config_dict
  
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 3 for calling a global function with example usage: get_dict_config(model_size, electra_path) and returns: config_dict