code: def get_electra_pretraining_model(
      model_name,
      ctx_l,
      max_seq_length=128,
      hidden_dropout_prob=0.1,
      attention_dropout_prob=0.1,
      generator_units_scale=None,
      generator_layers_scale=None,
      params_path=None,
  ):
      """
      A Electra Pretrain Model is built with a generator and a discriminator, in which
      the generator has the same embedding as the discriminator but different backbone.
      """
      cfg, tokenizer, _, _ = get_pretrained_electra(
          model_name, load_backbone=False
      )
      cfg = ElectraModel.get_cfg().clone_merge(cfg)
      cfg.defrost()
      cfg.MODEL.hidden_dropout_prob = hidden_dropout_prob
      cfg.MODEL.attention_dropout_prob = attention_dropout_prob
      cfg.MODEL.max_length = max_seq_length
      # Keep the original generator size if not designated
      if generator_layers_scale:
          cfg.MODEL.generator_layers_scale = generator_layers_scale
      if generator_units_scale:
          cfg.MODEL.generator_units_scale = generator_units_scale
      cfg.freeze()
  
      model = ElectraForPretrain(
          cfg,
          uniform_generator=False,
          tied_generator=False,
          tied_embeddings=True,
          disallow_correct=False,
          weight_initializer=TruncNorm(stdev=0.02),
      )
      if not params_path:
          model.initialize(ctx=ctx_l)
      else:
          model.load_parameters(params_path, ctx=ctx_l)
      model.hybridize()
      return cfg, tokenizer, model
  
imports: import io
  import os
  import re
  import random
  import logging
  import collections
  import numpy
  from mxnet import np, npx
  from mxnet.gluon import HybridBlock
  from mxnet.gluon.data import ArrayDataset
  import gluonnlp.data.batchify
  from gluonnlp.utils.misc import glob
  from gluonnlp.data.loading import NumpyDataset, DatasetLoader
  from gluonnlp.data.sampler import SplitSampler, FixedBucketSampler
  from gluonnlp.op import select_vectors_by_position, update_vectors_by_position
  from gluonnlp.initializer import TruncNorm
  from gluonnlp.models.electra import ElectraModel, ElectraForPretrain, get_pretrained_electra
label_desc: Use image node_id 11 for calling a global function with example usage: get_electra_pretraining_model(model_name, ctx_l, max_seq_length, hidden_dropout_prob, attention_dropout_prob, generator_units_scale, generator_layers_scale, params_path) and returns: cfg,  tokenizer,  model