code: def evaluate_pruned_model():
      model: BertForSequenceClassification = torch.load(
          "./output/pruning/embedding_pruned_model.pth"
      )
      trainer = prepare_traced_trainer(model, task_name)
      metric = trainer.evaluate()
      pruned_num_params = sum(
          param.numel() for param in model.parameters()
      ) + sum(buffer.numel() for buffer in model.buffers())
  
      model = build_finetuning_model(
          task_name, f"./output/bert_finetuned/{task_name}.bin"
      )
      ori_num_params = sum(
          param.numel() for param in model.parameters()
      ) + sum(buffer.numel() for buffer in model.buffers())
      print(
          f"Metric: {metric}\nSparsity: {1 - pruned_num_params / ori_num_params}"
      )
  
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 15 for calling a global function with example usage: evaluate_pruned_model() without return types