code: def test_mnist(mocked_model):
      transform = transforms.Compose(
          [
              transforms.ToTensor(),
              transforms.Normalize((0.1307,), (0.3081,)),
          ]
      )
      train_dataset = nni.trace(MNIST)(
          root="data/mnist",
          train=True,
          download=True,
          transform=transform,
      )
      test_dataset = nni.trace(MNIST)(
          root="data/mnist",
          train=False,
          download=True,
          transform=transform,
      )
      lightning = pl.Classification(
          train_dataloader=pl.DataLoader(train_dataset, batch_size=100),
          val_dataloaders=pl.DataLoader(test_dataset, batch_size=100),
          max_epochs=2,
          limit_train_batches=0.25,  # for faster training
          enable_progress_bar=enable_progress_bar,
          num_classes=10,
      )
      lightning.evaluate(MNISTModel())
      assert mocked_model.metric > 0.7
      assert len(mocked_model.metrics.intermediates) == 2
  
imports: import pytest
  import pytorch_lightning
  import torch
  import torch.nn
  import torch.nn.functional
  from sklearn.datasets import load_diabetes
  from torch.utils.data import Dataset
  from torchvision import transforms
  from torchvision.datasets import MNIST
  import nni
  import nni.nas.evaluator.pytorch.lightning
  from nni.nas.evaluator import FunctionalEvaluator, Evaluator
  from nni.nas.space import RawFormatModelSpace
label_desc: Use image node_id 3 for calling a global function with example usage: test_mnist(mocked_model) without return types