code: def get_pretrained_electra(
      model_name: str = "google_electra_small",
      root: str = get_model_zoo_home_dir(),
      load_backbone: bool = True,
      load_disc: bool = False,
      load_gen: bool = False,
  ) -> Tuple[
      CN,
      HuggingFaceWordPieceTokenizer,
      Optional[str],
      Tuple[Optional[str], Optional[str]],
  ]:
      """Get the pretrained Electra weights
  
      Parameters
      ----------
      model_name
          The name of the Electra model.
      root
          The downloading root
      load_backbone
          Whether to load the weights of the backbone network
      load_disc
          Whether to load the weights of the discriminator
      load_gen
          Whether to load the weights of the generator
  
      Returns
      -------
      cfg
          Network configuration
      tokenizer
          The HuggingFaceWordPieceTokenizer
      backbone_params_path
          Path to the parameter of the backbone network
      other_net_params_paths
          Path to the parameter of the discriminator and the generator.
          They will be returned inside a tuple.
      """
      assert (
          model_name in PRETRAINED_URL
      ), "{} is not found. All available are {}".format(
          model_name, list_pretrained_electra()
      )
      cfg_path = PRETRAINED_URL[model_name]["cfg"]
      if isinstance(cfg_path, CN):
          cfg = cfg_path
      else:
          cfg = None
      vocab_path = PRETRAINED_URL[model_name]["vocab"]
      params_path = PRETRAINED_URL[model_name]["params"]
      disc_params_path = PRETRAINED_URL[model_name]["disc_model"]
      gen_params_path = PRETRAINED_URL[model_name]["gen_model"]
  
      local_paths = dict()
      download_jobs = [("vocab", vocab_path)]
      if cfg is None:
          download_jobs.append(("cfg", cfg_path))
      for k, path in download_jobs:
          local_paths[k] = download(
              url=get_repo_model_zoo_url() + path,
              path=os.path.join(root, path),
              sha1_hash=FILE_STATS[path],
          )
      if load_backbone:
          local_params_path = download(
              url=get_repo_model_zoo_url() + params_path,
              path=os.path.join(root, params_path),
              sha1_hash=FILE_STATS[params_path],
          )
      else:
          local_params_path = None
      if load_disc:
          local_disc_params_path = download(
              url=get_repo_model_zoo_url() + disc_params_path,
              path=os.path.join(root, disc_params_path),
              sha1_hash=FILE_STATS[disc_params_path],
          )
      else:
          local_disc_params_path = None
  
      if load_gen:
          local_gen_params_path = download(
              url=get_repo_model_zoo_url() + gen_params_path,
              path=os.path.join(root, gen_params_path),
              sha1_hash=FILE_STATS[gen_params_path],
          )
      else:
          local_gen_params_path = None
  
      do_lower = (
          True
          if "lowercase" in PRETRAINED_URL[model_name]
          and PRETRAINED_URL[model_name]["lowercase"]
          else False
      )
      tokenizer = HuggingFaceWordPieceTokenizer(
          vocab_file=local_paths["vocab"],
          unk_token="[UNK]",
          pad_token="[PAD]",
          cls_token="[CLS]",
          sep_token="[SEP]",
          mask_token="[MASK]",
          lowercase=do_lower,
      )
      if cfg is None:
          cfg = ElectraModel.get_cfg().clone_merge(local_paths["cfg"])
      return (
          cfg,
          tokenizer,
          local_params_path,
          (local_disc_params_path, local_gen_params_path),
      )
  
imports: import os
  from typing import Tuple, Optional, List
  import mxnet
  from mxnet import use_np, np, npx
  from mxnet.gluon import HybridBlock, nn
  from .base import BACKBONE_REGISTRY
  from .transformer import TransformerEncoderLayer
  from ..op import gumbel_softmax, select_vectors_by_position, add_vectors_by_position, update_vectors_by_position
  from ..base import get_model_zoo_home_dir, get_repo_model_zoo_url, get_model_zoo_checksum_dir
  from ..layers import PositionalEmbedding, get_activation
  from ..initializer import TruncNorm
  from ..utils.config import CfgNode
  from ..utils.misc import load_checksum_stats, download
  from ..utils.registry import Registry
  from ..attention_cell import gen_self_attn_mask
  from ..data.tokenizers import HuggingFaceWordPieceTokenizer
label_desc: Use image node_id 6 for calling a global function with example usage: get_pretrained_electra(model_name, root, load_backbone, load_disc, load_gen) and returns: cfg,  tokenizer,  local_params_path,  local_disc_params_path,  local_gen_params_path