code: def test_nasbench201():
      benchmark = NasBench201Benchmark()
      exec_space = BenchmarkModelSpace(benchmark)
      model = exec_space.default()
      with benchmark.mock_runtime(model):
          model.execute()
      assert 0 < model.metric < 1
  
      for _ in range(30):
          model = exec_space.random()
          with benchmark.mock_runtime(model):
              model.execute()
          assert 0 < model.metric < 1
  
      pytorch_space = NasBench201()
      exec_space = BenchmarkModelSpace.from_model(
          pytorch_space, benchmark
      )
      model = exec_space.random()
      with benchmark.mock_runtime(model):
          model.execute()
      assert 0 < model.metric < 1
  
imports: from nni.mutable import SampleValidationError
  from nni.nas.benchmark import *
  from nni.nas.hub.pytorch import NasBench101, NasBench201
  from .prepare import *
label_desc: Use image node_id 2 for calling a global function with example usage: test_nasbench201() without return types