code: def speedup_embedding():
      model = torch.load(
          "./output/pruning/embedding_masked_model.pth",
          map_location="cpu",
      )
      masks = torch.load(
          "./output/pruning/embedding_masks.pth", map_location="cpu"
      )
      dummy_input = (
          torch.randint(0, 10000, [8, 128]),
          torch.randint(0, 2, [8, 128]),
          torch.randint(0, 2, [8, 128]),
      )
      ModelSpeedup(model, dummy_input, masks).speedup_model()
  
      # finetuning
      teacher_model = build_finetuning_model(
          "mnli", f"./output/bert_finetuned/{task_name}.bin"
      )
      adapt_distillation(model, teacher_model, None, 4)
      torch.save(model, "./output/pruning/embedding_pruned_model.pth")
  
imports: from __future__ import annotations
  from pathlib import Path
  import numpy
  import torch
  from torch.utils.data import ConcatDataset
  import nni
  from datasets import load_dataset, load_metric
  from transformers import BertTokenizerFast, DataCollatorWithPadding, BertForSequenceClassification, EvalPrediction
  from transformers.trainer import Trainer
  from transformers.training_args import TrainingArguments
  from nni.compression.distillation import DynamicLayerwiseDistiller, Adaptive1dLayerwiseDistiller
  from nni.compression.utils import TransformersEvaluator
  from nni.compression.pruning import MovementPruner
  from nni.compression.speedup import ModelSpeedup
  from nni.compression.utils.external.external_replacer import TransformersAttentionReplacer
  from nni.compression.pruning import TaylorPruner, AGPPruner
  from transformers.models.bert.modeling_bert import BertLayer
  from nni.compression.base.setting import PruningSetting
label_desc: Use image node_id 14 for calling a global function with example usage: speedup_embedding() without return types