code: def space_format(request):
      if request.param == "raw":
          return RawFormatModelSpace
      elif request.param == "simple":
          return SimplifiedModelSpace
      elif request.param == "graph":
          return PytorchGraphModelSpace
      else:
          raise ValueError(f"Unknown space format: {request.param}")
  
imports: import copy
  import random
  from types import ModuleType
  from typing import Type
  import pytest
  import nni
  import nni.nas.nn.pytorch.layers
  import nni.nas.evaluator.pytorch.lightning
  import torch
  import torch.nn.functional
  from nni.mutable import Categorical, ensure_frozen, label_scope, SampleValidationError
  from nni.nas.evaluator import FunctionalEvaluator
  from nni.nas.space import RawFormatModelSpace, SimplifiedModelSpace, ExecutableModelSpace, GraphModelSpace, model_context
  from nni.nas.space.pytorch import PytorchGraphModelSpace
  from nni.nas.nn.pytorch import ParametrizedModule, MutableModule, ModelSpace, LayerChoice, InputChoice, Cell, ChosenInputs, MutableConv2d, MutableLinear
label_desc: Use image node_id 1 for calling a global function with example usage: space_format(request) and returns: RawFormatModelSpace, SimplifiedModelSpace, PytorchGraphModelSpace