code: def test_hub_oneshot(space_type, strategy_type):
      NDS_SPACES = ["amoeba", "darts", "pnas", "enas", "nasnet"]
      if strategy_type == "proxyless":
          if (
              "width" in space_type
              or "depth" in space_type
              or any(
                  space_type.startswith(prefix)
                  for prefix in NDS_SPACES
                  + ["proxylessnas", "mobilenetv3", "autoformer"]
              )
          ):
              pytest.skip("The space has used unsupported APIs.")
      if (
          strategy_type in ["darts", "gumbel"]
          and space_type == "mobilenetv3"
      ):
          pytest.skip("Skip as it consumes too much memory.")
  
      WINDOWS_SPACES = [
          # Skip some spaces as Windows platform is slow.
          "nasbench201",
          "mobilenetv3",
          "proxylessnas",
          "shufflenet",
          "autoformer",
          "darts",
      ]
      if sys.platform == "win32" and space_type not in WINDOWS_SPACES:
          pytest.skip("Skip as Windows is too slow.")
  
      model_space = _hub_factory(space_type)
  
      dataset_type = "cifar10"
      if "imagenet" in space_type or space_type in [
          "mobilenetv3",
          "mobilenetv3_small",
          "proxylessnas",
          "shufflenet",
          "autoformer",
      ]:
          dataset_type = "imagenet"
  
      subset_size = 4
      if (
          strategy_type in ["darts", "gumbel"]
          and any(
              space_type.startswith(prefix) for prefix in NDS_SPACES
          )
          and "_" in space_type
      ):
          subset_size = 2
  
      train_dataset, valid_dataset = _dataset_factory(
          dataset_type, subset=subset_size
      )
      train_loader = pl.DataLoader(
          train_dataset, batch_size=2, num_workers=2, shuffle=True
      )
      valid_loader = pl.DataLoader(
          valid_dataset, batch_size=2, num_workers=2, shuffle=False
      )
  
      evaluator = pl.Classification(
          train_dataloaders=train_loader,
          val_dataloaders=valid_loader,
          max_epochs=1,
          export_onnx=False,
          accelerator="auto",
          devices=1,
          logger=False,  # disable logging and checkpoint to avoid too much log
          enable_checkpointing=False,
          enable_model_summary=False,
          num_classes=10 if dataset_type == "cifar10" else 1000,
          # profiler='advanced'
      )
  
      # To test on final model:
      # model = type(model_space).load_searched_model('darts-v2')
      # evaluator.fit(model)
  
      strategy = _strategy_factory(strategy_type)
  
      engine = SequentialExecutionEngine()
  
      strategy(RawFormatModelSpace(model_space, evaluator), engine)
  
      list(strategy.list_models())
  
imports: import logging
  import sys
  import pytest
  import numpy
  import torch
  from torch.utils.data import Subset
  from torchvision import transforms
  from torchvision.datasets import CIFAR10, ImageNet
  import nni
  import nni.nas.hub.pytorch
  import nni.nas.evaluator.pytorch
  import nni.nas.strategy
  from nni.nas.space import RawFormatModelSpace
  from nni.nas.execution import SequentialExecutionEngine
  from nni.nas.oneshot.pytorch.profiler import ExpectationProfilerPenalty
  from nni.nas.profiler.pytorch.flops import FlopsProfiler
label_desc: Use image node_id 5 for calling a global function with example usage: test_hub_oneshot(space_type, strategy_type) without return types